|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcreme.filters.OrderFilter
A filter that accepts objects that fulfill a given comparison relation with a given referent object, according to a given Comparator object.
Field Summary | |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
OrderFilter(OrderComparisonOperator op,
java.util.Comparator comp,
java.lang.Object referent)
Creates new OrderComparator |
Method Summary | |
boolean |
accept(java.lang.Object o)
Tells whether the given object 'passes' the filter or not. |
java.lang.Object |
clone()
This forces override of the Object class clone method. it makes a deep copy so a change in a subfilter does not affect the cloned version. |
boolean |
equals(java.lang.Object o)
Overloads the 'dummy' implementation in Object, so that it returns true only if the passed in parameter is a filter of the same kind as this one, and accepts exactly the same objects. |
java.util.Comparator |
getComparator()
Gives access to the COmparator object used by this filter. |
ComparisonOperator |
getOperator()
Gives access to the operator used by this filter. |
java.lang.Object |
getReferent()
Gives access to the referent object used by this filter. |
int |
hashCode()
Overloads the 'dummy' implementation in Object so that it fulfills the implicit hashCode contract, i.e. same filters have the same hashCode and different ones have different hashCodes. |
java.lang.String |
toString()
Gives an SQL-like string representation for this filter. |
java.lang.String |
toString(java.lang.String field)
This method is useful when generating SQL queries. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public OrderFilter(OrderComparisonOperator op, java.util.Comparator comp, java.lang.Object referent) throws java.lang.IllegalArgumentException
op
- The OrderComparisonOperator to be used.comp
- The Comparator object to be used to compare objects to the
referent object.referent
- The referent object 'tested' objects have to be compare to.
java.lang.IllegalArgumentException
- In case any of the passed in parameters is null, which is not
wanted here.Method Detail |
public boolean accept(java.lang.Object o)
accept
in interface Filter
o
- The object you want to 'test'.
public ComparisonOperator getOperator()
public java.lang.Object getReferent()
public java.util.Comparator getComparator()
public java.lang.String toString()
public java.lang.String toString(java.lang.String field)
field
- the field name that applies to this filter.
public boolean equals(java.lang.Object o)
o
- The object to be compared to this one.
public int hashCode()
public java.lang.Object clone()
clone
in interface Filter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |