Documentation of 'org.hecl.HashThing' Java class
HashThing
org.hecl

Class HashThing

  • All Implemented Interfaces:
    RealThing


    public class HashThing
    extends java.lang.Object
    implements RealThing
    The HashThing class represents a hash table type in Hecl.
    • Constructor Summary

      Constructors 
      Constructor and Description
      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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HashThing

        public HashThing()
        Creates a new, empty HashThing instance.
      • HashThing

        public HashThing(java.util.Hashtable h)
        Creates a new HashThing instance from a Hashtable.
        Parameters:
        h - a Hashtable value
      • HashThing

        public HashThing(java.util.Vector v)
                  throws HeclException
        Creates a new 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.
        Parameters:
        v - a Vector value
        Throws:
        HeclException - if an error occurs
    • Method Detail

      • thingclass

        public java.lang.String thingclass()
        Specified by:
        thingclass in interface RealThing
      • create

        public static Thing create(java.util.Hashtable h)
        create allocates and returns a new HashThing typed Thing.
        Parameters:
        h - a Hashtable value
        Returns:
        a Thing value
      • get

        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.
        Parameters:
        thing - a Thing value
        Returns:
        a Hashtable value
        Throws:
        HeclException - if an error occurs
      • getStringRep

        public 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.
        Specified by:
        getStringRep in interface RealThing
        Returns:
        a String value

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.