Interface KastMapState<UK,​UV>


  • public interface KastMapState<UK,​UV>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean contains​(UK key)
      Returns whether there exists the given mapping.
      Iterable<Map.Entry<UK,​UV>> entries()
      Returns all the mappings in the state.
      UV get​(UK key)
      Returns the current value associated with the given key.
      boolean isEmpty()
      Returns true if this state contains no key-value mappings, otherwise false.
      Iterator<Map.Entry<UK,​UV>> iterator()
      Iterates over all the mappings in the state.
      Iterable<UK> keys()
      Returns all the keys in the state.
      void put​(UK key, UV value)
      Associates a new value with the given key.
      void putAll​(Map<UK,​UV> map)
      Copies all of the mappings from the given map into the state.
      void remove​(UK key)
      Deletes the mapping of the given key.
      Iterable<UV> values()
      Returns all the values in the state.
    • Method Detail

      • get

        UV get​(UK key)
        throws Exception
        Returns the current value associated with the given key.
        Parameters:
        key - The key of the mapping
        Returns:
        The value of the mapping with the given key
        Throws:
        Exception - Thrown if the system cannot access the state.
      • put

        void put​(UK key,
                 UV value)
          throws Exception
        Associates a new value with the given key.
        Parameters:
        key - The key of the mapping
        value - The new value of the mapping
        Throws:
        Exception - Thrown if the system cannot access the state.
      • putAll

        void putAll​(Map<UK,​UV> map)
             throws Exception
        Copies all of the mappings from the given map into the state.
        Parameters:
        map - The mappings to be stored in this state
        Throws:
        Exception - Thrown if the system cannot access the state.
      • remove

        void remove​(UK key)
             throws Exception
        Deletes the mapping of the given key.
        Parameters:
        key - The key of the mapping
        Throws:
        Exception - Thrown if the system cannot access the state.
      • contains

        boolean contains​(UK key)
                  throws Exception
        Returns whether there exists the given mapping.
        Parameters:
        key - The key of the mapping
        Returns:
        True if there exists a mapping whose key equals to the given key
        Throws:
        Exception - Thrown if the system cannot access the state.
      • entries

        Iterable<Map.Entry<UK,​UV>> entries()
                                          throws Exception
        Returns all the mappings in the state.
        Returns:
        An iterable view of all the key-value pairs in the state.
        Throws:
        Exception - Thrown if the system cannot access the state.
      • keys

        Iterable<UK> keys()
                   throws Exception
        Returns all the keys in the state.
        Returns:
        An iterable view of all the keys in the state.
        Throws:
        Exception - Thrown if the system cannot access the state.
      • values

        Iterable<UV> values()
                     throws Exception
        Returns all the values in the state.
        Returns:
        An iterable view of all the values in the state.
        Throws:
        Exception - Thrown if the system cannot access the state.
      • iterator

        Iterator<Map.Entry<UK,​UV>> iterator()
                                           throws Exception
        Iterates over all the mappings in the state.
        Returns:
        An iterator over all the mappings in the state
        Throws:
        Exception - Thrown if the system cannot access the state.
      • isEmpty

        boolean isEmpty()
                 throws Exception
        Returns true if this state contains no key-value mappings, otherwise false.
        Returns:
        True if this state contains no key-value mappings, otherwise false.
        Throws:
        Exception - Thrown if the system cannot access the state.