com.acsinet_solutions.util.expr
Class XPathMapFilter<K,V>

java.lang.Object
  extended by com.acsinet_solutions.util.expr.XPathMapFilter<K,V>
All Implemented Interfaces:
MapFilter<K,V>
Direct Known Subclasses:
KeyXPathMapFilter, ValueXPathMapFilter

public abstract class XPathMapFilter<K,V>
extends java.lang.Object
implements MapFilter<K,V>

XPath based map filter. Applies an XPath expression to each value in the map to perform the filtering

Author:
Santiago Arriaga

Constructor Summary
protected XPathMapFilter(java.lang.String xpath)
          Public constructor
protected XPathMapFilter(java.lang.String xpath, MapFilter<K,V> nestedFilter)
          Public constructor
 
Method Summary
abstract  java.lang.Object getBean(java.util.Map.Entry<K,V> entry)
          This abstract method will be redefined by the inner classes returned by this class' factory methods
 java.util.Map<K,V> getFilteredMap(java.util.Map<K,V> original)
          Get a filtered version of the original provided Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathMapFilter

protected XPathMapFilter(java.lang.String xpath,
                         MapFilter<K,V> nestedFilter)
Public constructor

Parameters:
xpath - A not-null valid xpath expression
nestedFilter - A not-null filter to be applied before the current one.

XPathMapFilter

protected XPathMapFilter(java.lang.String xpath)
Public constructor

Parameters:
xpath - A not-null valid xpath expression
Method Detail

getFilteredMap

public final java.util.Map<K,V> getFilteredMap(java.util.Map<K,V> original)
Description copied from interface: MapFilter
Get a filtered version of the original provided Map. The original Map MUST NOT be intended to be modified.

Specified by:
getFilteredMap in interface MapFilter<K,V>
Parameters:
original - A not-null maybe-empty Map instance

getBean

public abstract java.lang.Object getBean(java.util.Map.Entry<K,V> entry)
This abstract method will be redefined by the inner classes returned by this class' factory methods

Parameters:
entry - A not-null Map.Entry instance
Returns:
Object The object that will be evaluated