com.nearform.patrun
Interface Modifier


public interface Modifier

An interface for a custom modifier used to customise the find and remove methods


Method Summary
 Object find(Patrun pm, Map<String,String> pat, Object data)
          Called when a node is matched against a pattern on the find method of Patrun
 Boolean remove(Patrun pm, Map<String,String> pat, Object data)
          Called when a node is about to be removed from the decision tree
 

Method Detail

find

Object find(Patrun pm,
            Map<String,String> pat,
            Object data)
Called when a node is matched against a pattern on the find method of Patrun

Parameters:
pm - the instance of the Patrun object
pat - the match pattern that was provided in the call to find on Patrun
data - the data object found that matches the pattern
Returns:
the data object to be returned from the find call on Patrun

remove

Boolean remove(Patrun pm,
               Map<String,String> pat,
               Object data)
Called when a node is about to be removed from the decision tree

Parameters:
pm - the instance of the Patrun object
pat - the match pattern that was provided in the call to remove on Patrun
data - the data object found that matches the pattern
Returns:
true if the object is to be deleted


Copyright © 2015. All rights reserved.