net.sourceforge.domian.specification
Class EqualIgnoreCaseStringSpecification

java.lang.Object
  extended by net.sourceforge.domian.specification.AbstractSpecification<T>
      extended by net.sourceforge.domian.specification.AbstractValueBoundSpecification<java.lang.String>
          extended by net.sourceforge.domian.specification.EqualIgnoreCaseStringSpecification
All Implemented Interfaces:
LeafSpecification<java.lang.String>, Specification<java.lang.String>, ValueBoundSpecification<java.lang.String>

final class EqualIgnoreCaseStringSpecification
extends AbstractValueBoundSpecification<java.lang.String>

Specification for string approval.

This specification is value bound. The value is a string, and candidate string objects must be equal to this value to be approved by this specification. Letter case is irrelevant.

Since:
0.1
Author:
Eirik Torske

Field Summary
 
Fields inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
originalValue, value
 
Fields inherited from class net.sourceforge.domian.specification.AbstractSpecification
type
 
Constructor Summary
EqualIgnoreCaseStringSpecification(java.lang.String value)
           
 
Method Summary
protected  RelationalOperator getBinaryRelation(java.lang.Boolean negated)
           
protected  java.lang.Boolean getDisjointDecision(RelationalOperator candidateRelationalOperator, java.lang.String candidateOperandValue)
           
 java.lang.Boolean isDisjointWith(Specification<?> specification)
           
 java.lang.Boolean isSatisfiedBy(java.lang.String candidate)
           
 
Methods inherited from class net.sourceforge.domian.specification.AbstractValueBoundSpecification
equals, getBinaryRelation, getValue, hashCode, invert
 
Methods inherited from class net.sourceforge.domian.specification.AbstractSpecification
and, containsSimpleCompositesOnly, containsValueBoundSpecificationsOnly, createValueBoundSpecification, getAllSpecifications, getNegatedSpecification, getNumberOfLevelsOfNegations, getType, hasConjunction, hasDisjunction, intersectsWith, 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
 

Constructor Detail

EqualIgnoreCaseStringSpecification

EqualIgnoreCaseStringSpecification(java.lang.String value)
Method Detail

getBinaryRelation

protected RelationalOperator getBinaryRelation(java.lang.Boolean negated)
Specified by:
getBinaryRelation in class AbstractValueBoundSpecification<java.lang.String>
Parameters:
negated - when true the returned binary relation will be inverted
Returns:
the mathematical binary relation bound to this value bound specification

getDisjointDecision

protected java.lang.Boolean getDisjointDecision(RelationalOperator candidateRelationalOperator,
                                                java.lang.String candidateOperandValue)
Specified by:
getDisjointDecision in class AbstractValueBoundSpecification<java.lang.String>
Returns:
true if the given candidate relation/operand pair leads to a disjoint relationship with this value bound specification

isSatisfiedBy

public java.lang.Boolean isSatisfiedBy(java.lang.String candidate)

isDisjointWith

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


Copyright © 2006-2010. All Rights Reserved.