net.sourceforge.domian.specification
Class EnumNameStringSpecification<E extends java.lang.Enum>

java.lang.Object
  extended by net.sourceforge.domian.specification.AbstractSpecification<java.lang.String>
      extended by net.sourceforge.domian.specification.EnumNameStringSpecification<E>
All Implemented Interfaces:
LeafSpecification<java.lang.String>, Specification<java.lang.String>

final class EnumNameStringSpecification<E extends java.lang.Enum>
extends AbstractSpecification<java.lang.String>
implements LeafSpecification<java.lang.String>

This specification will be satisfied by all strings that is a valid name for which this enum type specification is representing.

Since:
0.2
Author:
Eirik Torske
See Also:
java.lang.Enum

Field Summary
private  java.lang.Class<E> enumType
           
 
Fields inherited from class net.sourceforge.domian.specification.AbstractSpecification
type
 
Constructor Summary
EnumNameStringSpecification(java.lang.Class<E> enumType)
           
 
Method Summary
 java.lang.Class<E> getEnumType()
           
 java.lang.Class<java.lang.String> getType()
           
 java.lang.Boolean isSatisfiedBy(java.lang.String candidate)
           
 
Methods inherited from class net.sourceforge.domian.specification.AbstractSpecification
and, containsSimpleCompositesOnly, containsValueBoundSpecificationsOnly, createValueBoundSpecification, getAllSpecifications, getNegatedSpecification, getNumberOfLevelsOfNegations, hasConjunction, hasDisjunction, intersectsWith, invert, isDisjointWith, isGeneralizationOf, isIntersectionOf, isInvertible, isOddNumber, isSpecialCaseOf, or, purify, toString, where
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.specification.Specification
and, isDisjointWith, isGeneralizationOf, isSpecialCaseOf, or, where
 

Field Detail

enumType

private java.lang.Class<E extends java.lang.Enum> enumType
Constructor Detail

EnumNameStringSpecification

EnumNameStringSpecification(java.lang.Class<E> enumType)
Method Detail

getType

public java.lang.Class<java.lang.String> getType()
Specified by:
getType in interface Specification<java.lang.String>
Overrides:
getType in class AbstractSpecification<java.lang.String>

getEnumType

public java.lang.Class<E> getEnumType()

isSatisfiedBy

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


Copyright © 2006-2010. All Rights Reserved.