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>

public class SetValueMapAccessor<E> extends Object implements CompositeMapAccessor<Boolean>
SetValueMapAccessor.
Author:
Werner Randelshofer
  • Constructor Details

  • Method Details

    • get

      public Boolean get(Map<? super Key<?>,Object> a)
      Description copied from interface: MapAccessor
      Gets the value of the attribute denoted by this accessor from a Map.
      Specified by:
      get in interface MapAccessor<E>
      Parameters:
      a - A Map.
      Returns:
      The value of the attribute.
    • get

      public Boolean get(ReadOnlyMap<? super Key<?>,Object> a)
      Specified by:
      get in interface MapAccessor<E>
    • getDefaultValue

      public Boolean getDefaultValue()
      Description copied from interface: MapAccessor
      Returns 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:
      getDefaultValue in interface MapAccessor<E>
      Returns:
      the default value
    • getName

      public String getName()
      Description copied from interface: MapAccessor
      Returns the name string.
      Specified by:
      getName in interface MapAccessor<E>
      Returns:
      name string.
    • getSubAccessors

      public ImmutableSequencedSet<MapAccessor<?>> getSubAccessors()
      Description copied from interface: CompositeMapAccessor
      Gets all MapAccessors that this accessor is composing.
      Specified by:
      getSubAccessors in interface CompositeMapAccessor<E>
      Returns:
      the sub-accessors
    • getValueType

      public Class<Boolean> getValueType()
      Description copied from interface: MapAccessor
      Returns the value type of this map accessor.

      If the value type has type parameters, make sure to create it using TypeToken.

      Specified by:
      getValueType in interface MapAccessor<E>
    • isTransient

      public boolean isTransient()
      Description copied from interface: MapAccessor
      Whether the value needs to be made persistent.
      Specified by:
      isTransient in interface MapAccessor<E>
      Returns:
      true if transient
    • put

      public Boolean put(Map<? super Key<?>,Object> a, @Nullable Boolean value)
      Description copied from interface: MapAccessor
      Puts the value of the attribute denoted by this accessor from a Map.
      Specified by:
      put in interface MapAccessor<E>
      Parameters:
      a - A map.
      value - The new value. Subclasses may require that the value is non-null.
      Returns:
      The old value.
    • put

      public ImmutableMap<Key<?>,Object> put(ImmutableMap<Key<?>,Object> a, @Nullable Boolean value)
      Description copied from interface: MapAccessor
      Puts the value of the attribute denoted by this accessor from a Map.
      Specified by:
      put in interface MapAccessor<E>
      Parameters:
      a - A map.
      value - The new value. Subclasses may require that the value is non-null.
      Returns:
      The updated map.
    • remove

      public Boolean remove(Map<? super Key<?>,Object> a)
      Description copied from interface: MapAccessor
      Removes the value of the attribute denoted by this accessor from a Map.
      Specified by:
      remove in interface MapAccessor<E>
      Parameters:
      a - A map.
      Returns:
      The old value.
    • remove

      public ImmutableMap<Key<?>,Object> remove(ImmutableMap<Key<?>,Object> a)
      Description copied from interface: MapAccessor
      Removes the value of the attribute denoted by this accessor from a Map.
      Specified by:
      remove in interface MapAccessor<E>
      Parameters:
      a - A map.
      Returns:
      The old value.