Class CrudMapAdapter.SetLike<Value>

    • Constructor Detail

      • SetLike

        public SetLike()
    • Method Detail

      • get

        public final Unit get​(Value key)
        Description copied from interface: CrudMapAdapter
        Gets the value for the given key. Returns null when no value is available for the key.
        Specified by:
        get in interface CrudMapAdapter<Value,​Unit>
        Parameters:
        key - Key to access.
        Returns:
        The value associated with the key, or null when no value is associated with the key.
      • set

        public final void set​(Value key,
                              Unit unit)
        Description copied from interface: CrudMapAdapter
        Associates a value with the given key.
        Specified by:
        set in interface CrudMapAdapter<Value,​Unit>
        Parameters:
        key - Key to associate with a different value.
        unit - Value to associate with the key, never null.
      • add

        protected abstract void add​(Value value)
        Adds a given value to the set.
        Parameters:
        value - Value to add.
      • contains

        protected abstract boolean contains​(Value value)
        Checks whether the set contains the given value.
        Parameters:
        value - Value to check.
        Returns:
        Whether the set contains the value.