org.mmbase.storage.search.implementation
Class BasicFieldValueInConstraint
java.lang.Object
org.mmbase.storage.search.implementation.BasicConstraint
org.mmbase.storage.search.implementation.BasicFieldConstraint
org.mmbase.storage.search.implementation.BasicFieldValueInConstraint
- All Implemented Interfaces:
- Serializable, Constraint, FieldConstraint, FieldValueInConstraint
public class BasicFieldValueInConstraint
- extends BasicFieldConstraint
- implements FieldValueInConstraint, Serializable
Basic implementation.
- Since:
- MMBase-1.7
- Version:
- $Id: BasicFieldValueInConstraint.java 41982 2010-04-20 14:05:14Z michiel $
- Author:
- Rob van Maris
- See Also:
- Serialized Form
BasicFieldValueInConstraint
public BasicFieldValueInConstraint(StepField field)
- Constructor.
- Parameters:
field - The associated field.
addValue
public BasicFieldValueInConstraint addValue(Object value)
- Adds value.
- Parameters:
value - The value.
- Returns:
- This
BasicFieldValueInConstraint instance.
- Throws:
IllegalArgumentException - when an invalid argument is supplied.- See Also:
FieldValueInConstraint.getValues()
getValues
public SortedSet<Object> getValues()
- Description copied from interface:
FieldValueInConstraint
- Gets the list of values that is specified for this constraint.
- Specified by:
getValues in interface FieldValueInConstraint
equals
public boolean equals(Object obj)
- Description copied from interface:
Constraint
- Compares this constraint to the specified object. The result is
true if and only if the argument is a non-null
Constraint object representing the same constraint(s).
- Specified by:
equals in interface Constraint- Overrides:
equals in class BasicFieldConstraint
- Parameters:
obj - The object to compare with.
- Returns:
true if the objects are equal,
false otherwise.
hashCode
public int hashCode()
- Specified by:
hashCode in interface Constraint- Overrides:
hashCode in class BasicFieldConstraint
toString
public String toString()
- Description copied from interface:
FieldValueInConstraint
- Returns a string representation of this FieldValueInConstraint.
The string representation has the form
"FieldValueInConstraint(inverse:<:inverse>, field:<field>,
casesensitive:<casesensitive>, values:<values>)"
where
- <inverse>is the value returned by
isInverse()
- <field> is the field alias returned by
FieldConstraint#getField().getAlias()
- <casesensitive> is the value returned by
isCaseSensitive()
- <values> is the values returned by
getValues()
- Specified by:
toString in interface FieldValueInConstraint- Overrides:
toString in class BasicFieldConstraint
- Returns:
- A string representation of this FieldValueInConstraint.
MMBase 2.0-SNAPSHOT - null