public class ComparableFilter<T extends Comparable<T>> extends Object implements Filter<T>
ComparableFilter is a Filter implementation to do filtering
comparable property values (Make sure these property value types implements
Comparable).| Modifier and Type | Class and Description |
|---|---|
static class |
ComparableFilter.Operator
Operator represents the type of property comparison operator. |
| Constructor and Description |
|---|
ComparableFilter(ComparableProperty<?,T> property,
T value,
ComparableFilter.Operator operator)
Constructs a new
ComparableFilter instance with the specified
ComparableProperty, property value and operator type. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(Object entity)
Indicates the specified entity instance matches to this
ComparableFilter. |
ComparableFilter.Operator |
operator()
Returns the operator type this
ComparableFilter does filtering. |
Property<?,T> |
property()
Returns the property that this
ComparableFilter does filtering. |
String |
toString()
Returns the
String representation of this instance. |
T |
value()
Returns the value this
ComparableFilter does filtering. |
public ComparableFilter(ComparableProperty<?,T> property, T value, ComparableFilter.Operator operator)
ComparableFilter instance with the specified
ComparableProperty, property value and operator type.
This constructor is called by ComparableProperty's filtering
methods.property - The ComparableProperty instancevalue - The property valueoperator - The operator type.public Property<?,T> property()
ComparableFilter does filtering.property in interface Filter<T extends Comparable<T>>Property this Filter is applied to.public boolean matches(Object entity)
ComparableFilter.matches in interface Filter<T extends Comparable<T>>entity - The entity to be filtered.Filter or
not.public String toString()
String representation of this instance.public ComparableFilter.Operator operator()
ComparableFilter does filtering.public T value()
ComparableFilter does filtering.Copyright © 2009-2014 Eiichiro Uchiumi. All Rights Reserved.