Module org.jhotdraw8.fxcollection
Class SetValueMapAccessor<E>
java.lang.Object
org.jhotdraw8.fxcollection.typesafekey.SetValueMapAccessor<E>
- Type Parameters:
E- the value type
- All Implemented Interfaces:
CompositeMapAccessor<Boolean>,MapAccessor<Boolean>
SetValueMapAccessor.
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from interface org.jhotdraw8.fxcollection.typesafekey.CompositeMapAccessor
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionSetValueMapAccessor(String name, boolean isTransient, MapAccessor<ImmutableSet<E>> setAccessor, @Nullable E value, boolean defaultValue) SetValueMapAccessor(String name, MapAccessor<ImmutableSet<E>> setAccessor, E value) -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the attribute denoted by this accessor from a Map.get(ReadOnlyMap<? super Key<?>, Object> a) Returns the default value of this map accessor.getName()Returns the name string.Gets allMapAccessors that this accessor is composing.Returns the value type of this map accessor.booleanWhether the value needs to be made persistent.Puts the value of the attribute denoted by this accessor from a Map.ImmutableMap<Key<?>, Object> put(ImmutableMap<Key<?>, Object> a, @Nullable Boolean value) Puts the value of the attribute denoted by this accessor from a Map.Removes the value of the attribute denoted by this accessor from a Map.ImmutableMap<Key<?>, Object> remove(ImmutableMap<Key<?>, Object> a) Removes the value of the attribute denoted by this accessor from a Map.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxcollection.typesafekey.CompositeMapAccessor
containsKeyMethods inherited from interface org.jhotdraw8.fxcollection.typesafekey.MapAccessor
getRawValueType, set
-
Constructor Details
-
SetValueMapAccessor
public SetValueMapAccessor(String name, boolean isTransient, MapAccessor<ImmutableSet<E>> setAccessor, @Nullable E value, boolean defaultValue) -
SetValueMapAccessor
-
-
Method Details
-
get
Description copied from interface:MapAccessorGets the value of the attribute denoted by this accessor from a Map.- Specified by:
getin interfaceMapAccessor<E>- Parameters:
a- A Map.- Returns:
- The value of the attribute.
-
get
- Specified by:
getin interfaceMapAccessor<E>
-
getDefaultValue
Description copied from interface:MapAccessorReturns the default value of this map accessor.The default value of an attribute or property is the value used when that attribute or property is not specified.
- Specified by:
getDefaultValuein interfaceMapAccessor<E>- Returns:
- the default value
-
getName
Description copied from interface:MapAccessorReturns the name string.- Specified by:
getNamein interfaceMapAccessor<E>- Returns:
- name string.
-
getSubAccessors
Description copied from interface:CompositeMapAccessorGets allMapAccessors that this accessor is composing.- Specified by:
getSubAccessorsin interfaceCompositeMapAccessor<E>- Returns:
- the sub-accessors
-
getValueType
Description copied from interface:MapAccessorReturns the value type of this map accessor.If the value type has type parameters, make sure to create it using
TypeToken.- Specified by:
getValueTypein interfaceMapAccessor<E>
-
isTransient
public boolean isTransient()Description copied from interface:MapAccessorWhether the value needs to be made persistent.- Specified by:
isTransientin interfaceMapAccessor<E>- Returns:
- true if transient
-
put
Description copied from interface:MapAccessorPuts the value of the attribute denoted by this accessor from a Map.- Specified by:
putin interfaceMapAccessor<E>- Parameters:
a- A map.value- The new value. Subclasses may require that the value is non-null.- Returns:
- The old value.
-
put
Description copied from interface:MapAccessorPuts the value of the attribute denoted by this accessor from a Map.- Specified by:
putin interfaceMapAccessor<E>- Parameters:
a- A map.value- The new value. Subclasses may require that the value is non-null.- Returns:
- The updated map.
-
remove
Description copied from interface:MapAccessorRemoves the value of the attribute denoted by this accessor from a Map.- Specified by:
removein interfaceMapAccessor<E>- Parameters:
a- A map.- Returns:
- The old value.
-
remove
Description copied from interface:MapAccessorRemoves the value of the attribute denoted by this accessor from a Map.- Specified by:
removein interfaceMapAccessor<E>- Parameters:
a- A map.- Returns:
- The old value.
-