Class AssociativeArray2D

    • Constructor Detail

      • AssociativeArray2D

        public AssociativeArray2D()
        Default constructor which initializes the internal data with a LinkedHashMap.
      • AssociativeArray2D

        public AssociativeArray2D​(Map<Object,​AssociativeArray> internalData)
        Constructor that initializes the internal data with the provided map.
        Parameters:
        internalData -
    • Method Detail

      • remove

        public final AssociativeArray remove​(Object key)
        Removes a particular key from the internal map and returns the value associated with that key if present in the map.
        Parameters:
        key -
        Returns:
      • get

        public final AssociativeArray get​(Object key)
        Returns the value which is associated with the provided key.
        Parameters:
        key -
        Returns:
      • put

        public final AssociativeArray put​(Object key,
                                          AssociativeArray value)
        Adds a particular key-value into the internal map. It returns the previous value which was associated with that key.
        Parameters:
        key -
        value -
        Returns:
      • keySet

        public final Set<Object> keySet()
        Returns the keySet of the internal map.
        Returns:
      • get2d

        public final Object get2d​(Object key1,
                                  Object key2)
        Convenience function to get the value by using both keys.
        Parameters:
        key1 -
        key2 -
        Returns:
      • put2d

        public final Object put2d​(Object key1,
                                  Object key2,
                                  Object value)
        Convenience function used to put a value in a particular key positions.
        Parameters:
        key1 -
        key2 -
        value -
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object