net.sourceforge.domian.specification
Class RegularExpressionMatcherStringSpecification

java.lang.Object
  extended by net.sourceforge.domian.specification.AbstractSpecification<java.lang.String>
      extended by net.sourceforge.domian.specification.RegularExpressionMatcherStringSpecification
All Implemented Interfaces:
LeafSpecification<java.lang.String>, Specification<java.lang.String>, ValueBoundSpecification<java.lang.String>
Direct Known Subclasses:
WildcardExpressionMatcherStringSpecification

 class RegularExpressionMatcherStringSpecification
extends AbstractSpecification<java.lang.String>
implements ValueBoundSpecification<java.lang.String>

Specification that uses a regular expression engine for specifying strings.

Since:
0.2
Author:
Eirik Torske
See Also:
Java SE regex package

Field Summary
protected  java.util.regex.Pattern compiledRegularExpression
           
private static org.slf4j.Logger log
           
 
Fields inherited from class net.sourceforge.domian.specification.AbstractSpecification
type
 
Constructor Summary
RegularExpressionMatcherStringSpecification(java.lang.String regularExpression)
           
 
Method Summary
protected  java.util.regex.Pattern compileRegexPattern(java.lang.String regularExpression)
           
 boolean equals(java.lang.Object otherObject)
           
 java.lang.String getValue()
           
 int hashCode()
           
 java.lang.Boolean isDisjointWith(Specification<?> specification)
           
 java.lang.Boolean isSatisfiedBy(java.lang.String candidate)
           
 
Methods inherited from class net.sourceforge.domian.specification.AbstractSpecification
and, containsSimpleCompositesOnly, containsValueBoundSpecificationsOnly, createValueBoundSpecification, getAllSpecifications, getNegatedSpecification, getNumberOfLevelsOfNegations, getType, hasConjunction, hasDisjunction, intersectsWith, invert, isGeneralizationOf, isIntersectionOf, isInvertible, isOddNumber, isSpecialCaseOf, or, purify, toString, where
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.specification.Specification
and, getType, isGeneralizationOf, isSpecialCaseOf, or, where
 

Field Detail

log

private static final org.slf4j.Logger log

compiledRegularExpression

protected java.util.regex.Pattern compiledRegularExpression
Constructor Detail

RegularExpressionMatcherStringSpecification

RegularExpressionMatcherStringSpecification(java.lang.String regularExpression)
Method Detail

compileRegexPattern

protected java.util.regex.Pattern compileRegexPattern(java.lang.String regularExpression)

getValue

public java.lang.String getValue()
Specified by:
getValue in interface ValueBoundSpecification<java.lang.String>

isSatisfiedBy

public java.lang.Boolean isSatisfiedBy(java.lang.String candidate)
Specified by:
isSatisfiedBy in interface Specification<java.lang.String>

isDisjointWith

public java.lang.Boolean isDisjointWith(Specification<?> specification)
Specified by:
isDisjointWith in interface Specification<java.lang.String>
Overrides:
isDisjointWith in class AbstractSpecification<java.lang.String>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object otherObject)
Overrides:
equals in class java.lang.Object


Copyright © 2006-2010. All Rights Reserved.