Package com.exedio.cope.pattern
Class RangeField<E extends Comparable<E>>
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.RangeField<E>
-
- All Implemented Interfaces:
Settable<Range<E>>
,Serializable
public final class RangeField<E extends Comparable<E>> extends Pattern implements Settable<Range<E>>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Condition
contains(E value)
static <E extends Comparable<E>>
RangeField<E>create(FunctionField<E> borderTemplate)
boolean
doesContain(Item item, E value)
SetValue<?>[]
execute(Range<E> value, Item exceptionItem)
Range<E>
get(Item item)
FunctionField<E>
getFrom()
E
getFrom(Item item)
Set<Class<? extends Throwable>>
getInitialExceptions()
Returns the exceptions possibly thrown, when setting a value for this settable.Type
getInitialType()
FunctionField<E>
getTo()
E
getTo(Item item)
CheckConstraint
getUnison()
boolean
isFinal()
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.boolean
isInitial()
Returns true, if a value for the settable should be specified on the creation of an item.boolean
isMandatory()
static <E extends Comparable<E>>
RangeField<E>newRange(FunctionField<E> borderTemplate)
Deprecated.Usecreate(FunctionField)
insteadvoid
set(Item item, Range<? extends E> value)
void
setFrom(Item item, E from)
void
setTo(Item item, E to)
-
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, onMount, registerSource
-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Method Detail
-
create
public static <E extends Comparable<E>> RangeField<E> create(FunctionField<E> borderTemplate)
-
getFrom
public FunctionField<E> getFrom()
-
getTo
public FunctionField<E> getTo()
-
getUnison
public CheckConstraint getUnison()
-
execute
public SetValue<?>[] execute(Range<E> value, Item exceptionItem)
- Specified by:
execute
in interfaceSettable<E extends Comparable<E>>
-
isFinal
public boolean isFinal()
Description copied from interface:Settable
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.- Specified by:
isFinal
in interfaceSettable<E extends Comparable<E>>
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceSettable<E extends Comparable<E>>
-
getInitialType
public Type getInitialType()
- Specified by:
getInitialType
in interfaceSettable<E extends Comparable<E>>
-
isInitial
public boolean isInitial()
Description copied from interface:Settable
Returns true, if a value for the settable should be specified on the creation of an item.- Specified by:
isInitial
in interfaceSettable<E extends Comparable<E>>
-
getInitialExceptions
public Set<Class<? extends Throwable>> getInitialExceptions()
Description copied from interface:Settable
Returns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptions
in interfaceSettable<E extends Comparable<E>>
-
newRange
@Deprecated public static <E extends Comparable<E>> RangeField<E> newRange(FunctionField<E> borderTemplate)
Deprecated.Usecreate(FunctionField)
instead
-
-