Interface MapStore<K,​V>

  • Type Parameters:
    K - Key type for this map
    V - Value type for this map
    All Superinterfaces:
    Store

    public interface MapStore<K,​V>
    extends Store
    Interface representation of the backing store for a Map.
    • Method Detail

      • keysAreEmbedded

        boolean keysAreEmbedded()
        Accessor for whether the keys are embedded.
        Returns:
        Whether we have embedded keys
      • keysAreSerialised

        boolean keysAreSerialised()
        Accessor for whether the keys are serialised.
        Returns:
        Whether we have serialised keys
      • valuesAreEmbedded

        boolean valuesAreEmbedded()
        Accessor for whether the values are embedded.
        Returns:
        Whether we have embedded values
      • valuesAreSerialised

        boolean valuesAreSerialised()
        Accessor for whether the values are serialised.
        Returns:
        Whether we have serialised values
      • containsValue

        boolean containsValue​(ObjectProvider op,
                              Object value)
        Accessor for whether the Map contains this value.
        Parameters:
        op - ObjectProvider for the owner of the map.
        value - The value to check
        Returns:
        Whether it is contained.
      • containsKey

        boolean containsKey​(ObjectProvider op,
                            Object key)
        Accessor for whether the Map contains this key.
        Parameters:
        op - ObjectProvider for the owner of the map.
        key - The key to check
        Returns:
        Whether it is contained.
      • get

        V get​(ObjectProvider op,
              Object key)
        Accessor for a value from the Map.
        Parameters:
        op - ObjectProvider for the owner of the map.
        key - Key for the value.
        Returns:
        Value for this key.
      • put

        V put​(ObjectProvider op,
              K key,
              V value)
        Method to add a value to the Map against this key.
        Parameters:
        op - ObjectProvider for the owner of the map.
        key - The key.
        value - The value.
        Returns:
        Value that was previously against this key.
      • putAll

        void putAll​(ObjectProvider op,
                    Map<? extends K,​? extends V> m)
        Method to add a map of values to the Map.
        Parameters:
        op - ObjectProvider for the owner of the map.
        m - The map to add.
      • remove

        V remove​(ObjectProvider op,
                 Object key)
        Method to remove a value from the Map.
        Parameters:
        op - ObjectProvider for the owner of the map.
        key - Key whose value is to be removed.
        Returns:
        Value that was removed.
      • remove

        V remove​(ObjectProvider op,
                 Object key,
                 Object val)
        Method to remove a value from the Map.
        Parameters:
        op - ObjectProvider for the owner of the map.
        key - Key whose value is to be removed.
        val - Value for this key when the value is known (to save the lookup)
        Returns:
        Value that was removed.
      • clear

        void clear​(ObjectProvider op)
        Method to clear the map.
        Parameters:
        op - ObjectProvider for the owner of the map.
      • keySetStore

        SetStore keySetStore()
        Accessor for a backing store representing the key set for the Map.
        Returns:
        Keys for the Map.
      • valueCollectionStore

        CollectionStore valueCollectionStore()
        Accessor for a backing store representing the values in the Map.
        Returns:
        Values for the Map.
      • entrySetStore

        SetStore entrySetStore()
        Accessor for a backing store representing the entry set for the Map.
        Returns:
        Entry set for the Map.
      • updateEmbeddedKey

        boolean updateEmbeddedKey​(ObjectProvider op,
                                  Object key,
                                  int fieldNumber,
                                  Object newValue)
        Method to update an embedded key in the map.
        Parameters:
        op - ObjectProvider for the owner of the map
        key - The element
        fieldNumber - Field to update in the key
        newValue - The new value for the field
        Returns:
        Whether the element was modified
      • updateEmbeddedValue

        boolean updateEmbeddedValue​(ObjectProvider op,
                                    Object value,
                                    int fieldNumber,
                                    Object newValue)
        Method to update an embedded value in the map.
        Parameters:
        op - ObjectProvider for the owner of the map
        value - The element
        fieldNumber - Field to update in the value
        newValue - The new value for the field
        Returns:
        Whether the element was modified