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

Class Thing



  • public class Thing
    extends java.lang.Object
    The Thing class is what Hecl revolves around. "Things" can be of several types, include strings, integers, lists, hash tables.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      boolean global 
      static java.util.Vector references 
      static long thingcounter 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Thing(RealThing realthing)
      Creates a new Thing instance from an internal representation.
      Thing(java.lang.String s)
      Creates a new Thing instance from a string.
      Thing(java.lang.StringBuffer s)
      Creates a new Thing instance from a string buffer.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Thing deepcopy()
      deepcopy copies the thing, its value, and any elements the value might contain.
      static Thing emptyThing() 
      boolean equals(java.lang.Object obj)
      The equals method overrides the object equals method, using either the two objects, in the case of two ObjectThings, or the two string representations.
      RealThing getVal()
      getVal fetches the internal value of the Thing.
      int hashCode()
      The hashCode method overrides the object hashCode method, using the hash of the string representation.
      boolean isLiteral() 
      static boolean isTrue(Thing thing)
      isTrue is a convenience function that lets us know if the result of a calculation is true or false.
      void makeref(Thing newval)
      makeref sets the 'this' Thing to be a reference to the newval that was passed to it.
      void setCopyVal(RealThing realthing) 
      Thing setLiteral()
      The setLiteral method sets the thing in question to be a literal Thing, and returns it.
      void setVal(RealThing realthing)
      setVal sets the internal representation of the Thing.
      java.lang.String toString()
      toString returns the String value of a Thing.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • global

        public boolean global
      • thingcounter

        public static long thingcounter
      • references

        public static java.util.Vector references
    • Constructor Detail

      • Thing

        public Thing(java.lang.String s)
        Creates a new Thing instance from a string.
        Parameters:
        s - a String value
      • Thing

        public Thing(java.lang.StringBuffer s)
        Creates a new Thing instance from a string buffer.
        Parameters:
        s - a StringBuffer value
      • Thing

        public Thing(RealThing realthing)
        Creates a new Thing instance from an internal representation.
        Parameters:
        realthing - a RealThing value
    • Method Detail

      • setVal

        public void setVal(RealThing realthing)
        setVal sets the internal representation of the Thing.
        Parameters:
        realthing - a RealThing value
      • setCopyVal

        public void setCopyVal(RealThing realthing)
      • getVal

        public RealThing getVal()
        getVal fetches the internal value of the Thing.
        Returns:
        a RealThing value
      • emptyThing

        public static final Thing emptyThing()
      • isTrue

        public static boolean isTrue(Thing thing)
                              throws HeclException
        isTrue is a convenience function that lets us know if the result of a calculation is true or false.
        Parameters:
        thing - a Thing value
        Returns:
        a boolean value
        Throws:
        HeclException - if an error occurs
      • makeref

        public void makeref(Thing newval)
        makeref sets the 'this' Thing to be a reference to the newval that was passed to it.
        Parameters:
        newval - a Thing value.
      • toString

        public java.lang.String toString()
        toString returns the String value of a Thing.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String value
      • hashCode

        public int hashCode()
        The hashCode method overrides the object hashCode method, using the hash of the string representation.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        an int value
      • equals

        public boolean equals(java.lang.Object obj)
        The equals method overrides the object equals method, using either the two objects, in the case of two ObjectThings, or the two string representations.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - an Object value
        Returns:
        a boolean value
      • setLiteral

        public Thing setLiteral()
        The setLiteral method sets the thing in question to be a literal Thing, and returns it.
        Returns:
        a Thing value
      • isLiteral

        public boolean isLiteral()
      • deepcopy

        public Thing deepcopy()
                       throws HeclException
        deepcopy copies the thing, its value, and any elements the value might contain.
        Returns:
        a Thing value
        Throws:
        HeclException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.