|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hecl.HashThing
public class HashThing
The HashThing class represents a hash table type in Hecl.
| Constructor Summary | |
|---|---|
HashThing()
Creates a new, empty HashThing instance. |
|
HashThing(java.util.Hashtable h)
Creates a new HashThing instance from a Hashtable. |
|
HashThing(java.util.Vector v)
Creates a new HashThing instance from a Vector. |
|
| Method Summary | |
|---|---|
static Thing |
create(java.util.Hashtable h)
create allocates and returns a new HashThing typed
Thing. |
RealThing |
deepcopy()
deepcopy copies the hash table and all its elements. |
static java.util.Hashtable |
get(Thing thing)
get attempts to return a Hashtable from a given Thing, in
the process transforming that Thing into a HashThing internally. |
java.lang.String |
getStringRep()
getStringRep returns a string representation of a
HashThing, which is in reality a string representation of a ListThing,
only that there are guaranteed to be an even number of elements. |
java.lang.String |
thingclass()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashThing()
HashThing instance.
public HashThing(java.util.Hashtable h)
HashThing instance from a Hashtable.
h - a Hashtable value
public HashThing(java.util.Vector v)
throws HeclException
HashThing instance from a Vector. This may
throw an exception, because if the Vector doesn't have an even number of
elements, it won't be a valid hash table.
v - a Vector value
HeclException - if an error occurs| Method Detail |
|---|
public java.lang.String thingclass()
thingclass in interface RealThingpublic static Thing create(java.util.Hashtable h)
create allocates and returns a new HashThing typed
Thing.
h - a Hashtable value
Thing value
public static java.util.Hashtable get(Thing thing)
throws HeclException
get attempts to return a Hashtable from a given Thing, in
the process transforming that Thing into a HashThing internally.
thing - a Thing value
Hashtable value
HeclException - if an error occurs
public RealThing deepcopy()
throws HeclException
deepcopy copies the hash table and all its elements.
deepcopy in interface RealThingRealThing value
HeclExceptionpublic java.lang.String getStringRep()
getStringRep returns a string representation of a
HashThing, which is in reality a string representation of a ListThing,
only that there are guaranteed to be an even number of elements.
getStringRep in interface RealThingString value
HeclException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||