Package com.exedio.cope.pattern
Class EnumMapField<K extends Enum<K>,V>
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Pattern
com.exedio.cope.pattern.EnumMapField<K,V>
- All Implemented Interfaces:
MapFieldInterface<K,,V> Settable<EnumMap<K,,V>> Serializable
public final class EnumMapField<K extends Enum<K>,V>
extends Pattern
implements Settable<EnumMap<K,V>>, MapFieldInterface<K,V>
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K extends Enum<K>,V>
EnumMapField<K,V> create(Class<K> keyClass, FunctionField<V> value) SetValue<?>[]fallback()fallbackTo(K key) Returns value associated with given key for item.getAttribute(K key) Deprecated.getFunctionWithFallback(K key) Returns the exceptions possibly thrown, when setting a value for this settable.Returns the Key Class of this.Returns the map for given item.getMapWithFallback(Item item) Returns the Value Class of this.getWithFallback(Item item, K key) booleanbooleanisFinal()Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.booleanReturns true, if a value for the settable should be specified on the creation of an item.booleanstatic <K extends Enum<K>,V>
EnumMapField<K,V> newMap(Class<K> keyClass, FunctionField<V> value) Deprecated.Usecreate(Class,FunctionField)insteadvoidSets value associated with given key for item.voidSets the map for given item.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, registerSourceMethods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Method Details
-
create
public static <K extends Enum<K>,V> EnumMapField<K,V> create(Class<K> keyClass, FunctionField<V> value) -
fallbackTo
-
fallback
- See Also:
-
defaultTo
-
getKeyClass
Description copied from interface:MapFieldInterfaceReturns the Key Class of this.- Specified by:
getKeyClassin interfaceMapFieldInterface<K extends Enum<K>,V>
-
getField
-
getValueTemplate
-
getValueClass
Description copied from interface:MapFieldInterfaceReturns the Value Class of this.- Specified by:
getValueClassin interfaceMapFieldInterface<K extends Enum<K>,V>
-
get
Description copied from interface:MapFieldInterfaceReturns value associated with given key for item. -
set
Description copied from interface:MapFieldInterfaceSets value associated with given key for item. -
getMap
Description copied from interface:MapFieldInterfaceReturns the map for given item. -
setMap
Description copied from interface:MapFieldInterfaceSets the map for given item. -
execute
-
isFinal
public boolean isFinal()Description copied from interface:SettableReturns 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:
isMandatoryin interfaceSettable<K extends Enum<K>>
-
getInitialType
- Specified by:
getInitialTypein interfaceSettable<K extends Enum<K>>
-
isInitial
public boolean isInitial()Description copied from interface:SettableReturns true, if a value for the settable should be specified on the creation of an item. -
getInitialExceptions
Description copied from interface:SettableReturns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptionsin interfaceSettable<K extends Enum<K>>
-
hasFallbacks
public boolean hasFallbacks() -
getFallback
-
getWithFallback
-
getMapWithFallback
-
getFunctionWithFallback
-
newMap
@Deprecated public static <K extends Enum<K>,V> EnumMapField<K,V> newMap(Class<K> keyClass, FunctionField<V> value) Deprecated.Usecreate(Class,FunctionField)instead -
getAttribute
Deprecated.renamed togetField(Enum).
-
getField(Enum).