org.mmbase.storage.search.implementation
Class BasicFieldValueInConstraint

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicConstraint
      extended byorg.mmbase.storage.search.implementation.BasicFieldConstraint
          extended byorg.mmbase.storage.search.implementation.BasicFieldValueInConstraint
All Implemented Interfaces:
Constraint, FieldConstraint, FieldValueInConstraint

public class BasicFieldValueInConstraint
extends BasicFieldConstraint
implements FieldValueInConstraint

Basic implementation.

Since:
MMBase-1.7
Version:
$Id: BasicFieldValueInConstraint.java,v 1.10 2004/03/15 14:54:26 robmaris Exp $
Author:
Rob van Maris

Constructor Summary
BasicFieldValueInConstraint(StepField field)
          Constructor.
 
Method Summary
 BasicFieldValueInConstraint addValue(java.lang.Object value)
          Adds value.
 boolean equals(java.lang.Object obj)
          Compares this constraint to the specified object.
 java.util.SortedSet getValues()
          Gets the list of values that is specified for this constraint, the values being represented by strings.
 int hashCode()
           
 java.lang.String toString()
          Returns a string representation of this FieldValueInConstraint.
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicFieldConstraint
getField, isCaseSensitive, setCaseSensitive
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicConstraint
getBasicSupportLevel, isInverse, setInverse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.storage.search.FieldConstraint
getField, isCaseSensitive
 
Methods inherited from interface org.mmbase.storage.search.Constraint
getBasicSupportLevel, isInverse
 

Constructor Detail

BasicFieldValueInConstraint

public BasicFieldValueInConstraint(StepField field)
Constructor.

Parameters:
field - The associated field.
Method Detail

addValue

public BasicFieldValueInConstraint addValue(java.lang.Object value)
Adds value.

Parameters:
value - The value.
Returns:
This BasicFieldValueInConstraint instance.
Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.
See Also:
FieldValueInConstraint.getValues()

getValues

public java.util.SortedSet getValues()
Description copied from interface: FieldValueInConstraint
Gets the list of values that is specified for this constraint, the values being represented by strings.

Numerical values are represented by strings using the standard floating point format. Integral numerical values, however, are represented by strings using the standard integer format, i.e. without the decimal point (e.g. "123" instead of "123.0").

Specified by:
getValues in interface FieldValueInConstraint

equals

public boolean equals(java.lang.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

hashCode

public int hashCode()
Specified by:
hashCode in interface Constraint
Overrides:
hashCode in class BasicFieldConstraint

toString

public java.lang.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

Specified by:
toString in interface FieldValueInConstraint


MMBase build 1.7.4.20050922