org.datamanager.constraint
Class NameContainsConstraint
java.lang.Object
|
+--org.datamanager.kernel.AbstractEntityConstraint
|
+--org.datamanager.constraint.NameContainsConstraint
- All Implemented Interfaces:
- Constraint, EntityConstraint, EntityValue, Serializable
- public class NameContainsConstraint
- extends AbstractEntityConstraint
Check to see if the name of an Entity contains a
given String.
- Author:
- Benjamin Keil
- See Also:
- Serialized Form
Method Summary |
protected boolean |
describes(Entity defendant)
Check to see if the name of the given Entity
contains the String given to the constructor
of this constraint. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NameContainsConstraint
public NameContainsConstraint(String partialName)
- Create a new NameContainsConstraint that matches
the given String.
- Parameters:
partialName
- A String to find in the name of
an Entity.
describes
protected boolean describes(Entity defendant)
throws DataManagerException
- Check to see if the name of the given Entity
contains the String given to the constructor
of this constraint.
- Specified by:
describes
in class AbstractEntityConstraint
- Parameters:
defendant
- An Entity to check.
- Returns:
- Whether the name of the Entity contains
the string given in the constructor.
DataManagerException
See the Helium Website