Package com.exedio.cope.pattern
Class MapField<K,V>
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Pattern
com.exedio.cope.pattern.MapField<K,V>
- All Implemented Interfaces:
MapFieldInterface<K,
,V> Serializable
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopyKeyWith
(FunctionField<?> copyWith) copyValueWith
(FunctionField<?> copyWith) static <K,
V> MapField<K, V> create
(FunctionField<K> key, FunctionField<V> value) Returns value associated with given key for item.getAndCast
(Item item, Object key) getKey()
Returns the Key Class of this.Returns the map for given item.ItemField<?>
Type<?>
getValue()
Returns the Value Class of this.static <K,
V> MapField<K, V> newMap
(FunctionField<K> key, FunctionField<V> value) Deprecated.protected void
onMount()
Here you can do additional initialization not yet done in the constructor.void
Sets value associated with given key for item.void
setAndCast
(Item item, Object key, Object value) void
Sets 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, 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 Details
-
create
-
copyKeyWith
-
copyValueWith
-
onMount
protected void onMount()Description copied from class:Pattern
Here you can do additional initialization not yet done in the constructor. In this method you can call methodsPattern.getType()
andFeature.getName()
for the first time. -
getParent
-
getParent
-
getKeyClass
Description copied from interface:MapFieldInterface
Returns the Key Class of this.- Specified by:
getKeyClass
in interfaceMapFieldInterface<K,
V>
-
getKey
-
getUniqueConstraint
-
getValueClass
Description copied from interface:MapFieldInterface
Returns the Value Class of this.- Specified by:
getValueClass
in interfaceMapFieldInterface<K,
V>
-
getValue
-
getRelationType
-
get
Description copied from interface:MapFieldInterface
Returns value associated with given key for item.- Specified by:
get
in interfaceMapFieldInterface<K,
V>
-
set
Description copied from interface:MapFieldInterface
Sets value associated with given key for item.- Specified by:
set
in interfaceMapFieldInterface<K,
V>
-
getMap
Description copied from interface:MapFieldInterface
Returns the map for given item.- Specified by:
getMap
in interfaceMapFieldInterface<K,
V>
-
setMap
Description copied from interface:MapFieldInterface
Sets the map for given item.- Specified by:
setMap
in interfaceMapFieldInterface<K,
V>
-
getAndCast
-
setAndCast
-
join
-
newMap
Deprecated.Usecreate(FunctionField,FunctionField)
instead
-
create(FunctionField,FunctionField)
instead