|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScalarHash
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. |
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 key)
Removes the specified scalar from the hashmap. |
Method Detail |
---|
Scalar getAt(Scalar key)
ScalarArray keys()
void remove(Scalar key)
java.util.Map getData()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |