org.eclipse.ecf.presence.search
Class SimpleCriterion
java.lang.Object
org.eclipse.ecf.presence.search.SimpleCriterion
- All Implemented Interfaces:
- ICriterion
public class SimpleCriterion
- extends java.lang.Object
- implements ICriterion
Base class implementation of ICriterion
for simple comparisons. Subclasses may be created as
appropriate.
- Since:
- 2.0
Field Summary |
protected java.lang.String |
field
|
protected boolean |
ignoreCase
|
protected java.lang.String |
operator
|
protected java.lang.String |
value
|
Constructor Summary |
SimpleCriterion(java.lang.String field,
java.lang.String value,
java.lang.String operator)
Constructor for a instance of ICriterion . |
SimpleCriterion(java.lang.String field,
java.lang.String value,
java.lang.String operator,
boolean ignoreCase)
Constructor for a instance of ICriterion |
Method Summary |
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
java.lang.String |
toExpression()
Returns a expression composed for the search. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
field
protected final java.lang.String field
value
protected final java.lang.String value
operator
protected final java.lang.String operator
ignoreCase
protected final boolean ignoreCase
SimpleCriterion
public SimpleCriterion(java.lang.String field,
java.lang.String value,
java.lang.String operator,
boolean ignoreCase)
- Constructor for a instance of
ICriterion
- Parameters:
field
- Name of the fieldvalue
- Value that match the searchoperator
- Operator opportune for the searchignoreCase
- Consider case or not
SimpleCriterion
public SimpleCriterion(java.lang.String field,
java.lang.String value,
java.lang.String operator)
- Constructor for a instance of
ICriterion
. This is
ignore case
- Parameters:
field
- Name of the fieldvalue
- Value that match the searchoperator
- Operator opportune for the search
toExpression
public java.lang.String toExpression()
- Description copied from interface:
ICriterion
- Returns a expression composed for the search.
The String can be something like 'field' + 'operator' + value,
that it will be interpreted for each specific provider.
- Specified by:
toExpression
in interface ICriterion
- Returns:
- String
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object