org.datamanager.constraint
Class StringValueMatchesConstraint

java.lang.Object
  |
  +--org.datamanager.kernel.AbstractEntityConstraint
        |
        +--org.datamanager.constraint.StringValueMatchesConstraint
All Implemented Interfaces:
Constraint, EntityConstraint, EntityValue, Serializable

public class StringValueMatchesConstraint
extends AbstractEntityConstraint

Matches a StringEntityValue with a given regular expression.

Version:
$Revision: 1.2 $
See Also:
Pattern, Serialized Form

Field Summary
 
Fields inherited from class org.datamanager.kernel.AbstractEntityConstraint
DEBUG_ACCEPTS_MESSAGE
 
Fields inherited from interface org.datamanager.constraint.EntityConstraint
NONE
 
Constructor Summary
StringValueMatchesConstraint(Pattern pattern)
          Creates a new StringValueMatchesConstraint with the given pattern.
StringValueMatchesConstraint(String patternString)
          Creates a new StringValueMatchesConstraint with the given pattern.
 
Method Summary
protected  boolean describes(Entity defendant)
          The method required by this class.
 
Methods inherited from class org.datamanager.kernel.AbstractEntityConstraint
accepts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringValueMatchesConstraint

public StringValueMatchesConstraint(Pattern pattern)
Creates a new StringValueMatchesConstraint with the given pattern.


StringValueMatchesConstraint

public StringValueMatchesConstraint(String patternString)
Creates a new StringValueMatchesConstraint with the given pattern.

Method Detail

describes

protected boolean describes(Entity defendant)
                     throws DataManagerException
Description copied from class: AbstractEntityConstraint
The method required by this class. This method has the exact same semantics as the interface EntityConstraint's accepts() method.

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