Package sleep.engine.types
Class HashContainer
- java.lang.Object
-
- sleep.engine.types.HashContainer
-
- All Implemented Interfaces:
java.io.Serializable,ScalarHash
- Direct Known Subclasses:
OrderedHashContainer
public class HashContainer extends java.lang.Object implements ScalarHash
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Mapvalues
-
Constructor Summary
Constructors Constructor Description HashContainer()HashContainer(java.util.Map container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalargetAt(Scalar key)Retrieves a scalar from the hashtable.java.util.MapgetData()Return the data structure backing this hash pleaseScalarArraykeys()Returns all of the keys within the scalar hash.voidremove(Scalar value)Removes the specified scalar from the hashmap.java.lang.StringtoString()
-
-
-
Method Detail
-
getAt
public Scalar getAt(Scalar key)
Description copied from interface:ScalarHashRetrieves 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:
getAtin interfaceScalarHash
-
getData
public java.util.Map getData()
Description copied from interface:ScalarHashReturn the data structure backing this hash please- Specified by:
getDatain interfaceScalarHash
-
keys
public ScalarArray keys()
Description copied from interface:ScalarHashReturns 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:
keysin interfaceScalarHash
-
remove
public void remove(Scalar value)
Description copied from interface:ScalarHashRemoves the specified scalar from the hashmap. :)- Specified by:
removein interfaceScalarHash
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-