org.datamanager.constraint
Class StringValueContainsConstraint
java.lang.Object
|
+--org.datamanager.kernel.AbstractEntityConstraint
|
+--org.datamanager.constraint.StringValueContainsConstraint
- All Implemented Interfaces:
- Constraint, EntityConstraint, EntityValue, Serializable
- public class StringValueContainsConstraint
- extends AbstractEntityConstraint
Matches a StringEntityValue with any given String.
This class matches any Entity that has a
StringEntityValue that contains the String given in
the constructor of this class. Currently this
constraint only does an indexOf() to see if the
value contains the given String.
- Author:
- Matthew Farrellee
- See Also:
- Serialized Form
Method Summary |
protected boolean |
describes(Entity defendant)
Decide if the Entity is valid or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringValueContainsConstraint
public StringValueContainsConstraint(String value)
- The default constructor. It uses indexOf() to
find the given String in a StringEntityValue.
describes
protected boolean describes(Entity defendant)
throws DataManagerException
- Decide if the Entity is valid or not. It uses
indexOf() to find the given String in a
StringEntityValue.
- Specified by:
describes
in class AbstractEntityConstraint
- Parameters:
defendant
- An entity to check.
- Returns:
- Whether the entity is acceptable or not.
DataManagerException
See the Helium Website