sleep.runtime
public interface ScalarHash extends Serializable
This interface lets you create your own scalar hash implementation.
To create a new type of scalar hash: create a class that implements the sleep.runtime.ScalarHash interface. The scalar hash interface asks for methods that define all of the common operations on sleep hashes.
To instantiate a custom scalar hash:
Scalar temp = SleepUtils.getHashScalar(new MyHashScalar());
In the above example MyHashScalar is the class name of your new scalar hash implementation.
Keep in mind when implementing the interface below that you are defining the interface to a dictionary style data structure.
Method Summary | |
---|---|
Scalar | getAt(Scalar key) Retrieves a scalar from the hashtable. |
ScalarArray | keys() Returns all of the keys within the scalar hash. |
void | remove(Scalar key) Removes the specified scalar from the hashmap. |