Package com.mayam.wf.attributes.shared
Class AttributeMultiMap
java.lang.Object
com.mayam.wf.attributes.shared.AttributeMultiMap
- All Implemented Interfaces:
Serializable
Map from
Attribute
to a set of values and a flag indicating
inclusive or exclusive use. When properly injected,
the map will validate input to make sure it conforms to
Attribute
annotations.- Author:
- Markus MÃ¥rtensson
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static interface
Describes a class containing anAttributeMultiMap
. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAsExclusion
(Attribute attribute, Object value) void
addAsExclusions
(Attribute attribute, Object... values) void
addAsExclusions
(Attribute attribute, Collection<? extends Object> values) void
addAsInclusion
(Attribute attribute, Object value) void
addAsInclusions
(Attribute attribute, Object... values) void
addAsInclusions
(Attribute attribute, Collection<? extends Object> values) void
clear()
Removes all values from the values.boolean
containsAttribute
(Attribute attribute) copy()
Creates a full copy of the values.copy
(Collection<Attribute> attributes) Creates a partial copy of the map, including only the provided collection of attributes.boolean
getAttributeInclusivity
(Attribute attribute) <T> Set
<T> getAttributeValues
(Attribute attribute) <T> Set
<T> getAttributeValues
(Attribute attribute, Class<T> cls) int
hashCode()
boolean
Checks for the existence ofAttributeValidator
helper instance.void
injectHelpers
(AttributeValidator validator) Injects helper objects.static AttributeMultiMap
merge
(AttributeMultiMap original, AttributeMultiMap overrides) Merges two AttributeRangeMap objects with priority given to the one referred to as "overrides".void
putAll
(AttributeMultiMap other) void
-
Field Details
-
validator
-
-
Constructor Details
-
AttributeMultiMap
public AttributeMultiMap()
-
-
Method Details
-
hasInjectedHelpers
public boolean hasInjectedHelpers()Checks for the existence ofAttributeValidator
helper instance.- Returns:
- true if the helper is injected.
-
hashCode
public int hashCode() -
equals
-
clear
public void clear()Removes all values from the values. -
getAttributeSet
-
copy
Creates a full copy of the values. Dirty values are included, but the resulting map will have no dirty flags set.- Returns:
- new values.
-
copy
Creates a partial copy of the map, including only the provided collection of attributes. Dirty values are included, but the resulting map will have no dirty flags set.- Returns:
- new values.