Package com.exedio.cope.pattern
Class EnumSetField<E extends Enum<E>>
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.EnumSetField<E>
-
- All Implemented Interfaces:
Settable<EnumSet<E>>
,Serializable
public final class EnumSetField<E extends Enum<E>> extends Pattern implements Settable<EnumSet<E>>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(Item item, E element)
boolean
contains(Item item, E element)
Condition
contains(E element)
static <E extends Enum<E>>
EnumSetField<E>create(Class<E> elementClass)
SetValue<?>[]
execute(EnumSet<E> value, Item exceptionItem)
EnumSet<E>
get(Item item)
BEWARE: Results are not unmodifiable, since EnumSets cannot be unmodifiable.Class<E>
getElementClass()
BooleanField
getField(E element)
Set<Class<? extends Throwable>>
getInitialExceptions()
Returns the exceptions possibly thrown, when setting a value for this settable.Type
getInitialType()
Class<E>
getKeyClass()
Deprecated.UsegetElementClass()
insteadboolean
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 Enum<E>>
EnumSetField<E>newSet(Class<E> elementClass)
Deprecated.Usecreate(Class)
insteadvoid
remove(Item item, E element)
void
set(Item item, EnumSet<E> value)
EnumSetField<E>
toFinal()
-
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 Enum<E>> EnumSetField<E> create(Class<E> elementClass)
-
toFinal
public EnumSetField<E> toFinal()
-
getField
public BooleanField getField(E element)
-
get
@Nonnull public EnumSet<E> get(@Nonnull Item item)
BEWARE: Results are not unmodifiable, since EnumSets cannot be unmodifiable.
-
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.
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceSettable<E extends Enum<E>>
-
getInitialType
public Type getInitialType()
- Specified by:
getInitialType
in interfaceSettable<E extends Enum<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.
-
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 Enum<E>>
-
newSet
@Deprecated public static <E extends Enum<E>> EnumSetField<E> newSet(Class<E> elementClass)
Deprecated.Usecreate(Class)
instead
-
getKeyClass
@Deprecated public Class<E> getKeyClass()
Deprecated.UsegetElementClass()
instead
-
-