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:
Serializable,CompositeMapAccessor<Boolean>,MapAccessor<Boolean>
SetValueMapAccessor.
- Author:
- Werner Randelshofer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSetValueMapAccessor(@NonNull String name, boolean isTransient, @NonNull MapAccessor<ImmutableSet<E>> setAccessor, @Nullable E value, boolean defaultValue) SetValueMapAccessor(@NonNull String name, @NonNull MapAccessor<ImmutableSet<E>> setAccessor, E value) -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the attribute denoted by this accessor from a Map.get(@NonNull ReadOnlyMap<? super Key<?>, Object> a) Returns the default value of this map accessor.getName()Returns the name string.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.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.remove(@NonNull 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(@NonNull String name, boolean isTransient, @NonNull MapAccessor<ImmutableSet<E>> setAccessor, @Nullable E value, boolean defaultValue) -
SetValueMapAccessor
public SetValueMapAccessor(@NonNull String name, @NonNull MapAccessor<ImmutableSet<E>> setAccessor, E value)
-
-
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
- Specified by:
getSubAccessorsin interfaceCompositeMapAccessor<E>
-
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
public @NonNull ImmutableMap<Key<?>,Object> put(@NonNull ImmutableMap<Key<?>, Object> a, @Nullable Boolean value) 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.
-