Class HashContainer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map values  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Scalar getAt​(Scalar key)
      Retrieves a scalar from the hashtable.
      java.util.Map getData()
      Return the data structure backing this hash please
      ScalarArray keys()
      Returns all of the keys within the scalar hash.
      void remove​(Scalar value)
      Removes the specified scalar from the hashmap.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • values

        protected java.util.Map values
    • Constructor Detail

      • HashContainer

        public HashContainer​(java.util.Map container)
      • HashContainer

        public HashContainer()
    • Method Detail

      • getAt

        public Scalar getAt​(Scalar key)
        Description copied from interface: ScalarHash
        Retrieves a scalar from the hashtable. If a scalar key does not exist then the key should be created with a value of $null. This $null or empty scalar value should be returned by the function. This is how values are added to Scalar hashes.
        Specified by:
        getAt in interface ScalarHash
      • getData

        public java.util.Map getData()
        Description copied from interface: ScalarHash
        Return the data structure backing this hash please
        Specified by:
        getData in interface ScalarHash
      • keys

        public ScalarArray keys()
        Description copied from interface: ScalarHash
        Returns all of the keys within the scalar hash. If a key has a $null (aka empty scalar) value the key should be removed from the scalar hash.
        Specified by:
        keys in interface ScalarHash
      • remove

        public void remove​(Scalar value)
        Description copied from interface: ScalarHash
        Removes the specified scalar from the hashmap. :)
        Specified by:
        remove in interface ScalarHash
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object