org.hecl
Class GroupThing

java.lang.Object
  extended by org.hecl.GroupThing
All Implemented Interfaces:
RealThing

public class GroupThing
extends java.lang.Object
implements RealThing

The GroupThing class is for Hecl "groups". For instance, "foo $foo [foo]" must have its components kept together, and is not a proper list.

Version:
1.0
Author:
David N. Welton

Field Summary
protected  java.util.Vector val
           
 
Constructor Summary
GroupThing(java.lang.String s)
          Creates a new GroupThing instance from a string.
GroupThing(java.util.Vector v)
          Creates a new GroupThing instance from a vector.
 
Method Summary
static Thing create(java.util.Vector v)
          The create method takes a Vector of Things and creates a Thing containing a GroupThing.
 RealThing deepcopy()
          deepcopy makes a copy of a GroupThing and all its elements.
static java.util.Vector get(Thing thing)
          get returns a Vector containing other Things, representing a group, from a Thing.
 java.lang.String getStringRep()
          getStringRep returns a string representation of the group.
 java.lang.String thingclass()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

val

protected java.util.Vector val
Constructor Detail

GroupThing

public GroupThing(java.util.Vector v)
Creates a new GroupThing instance from a vector.

Parameters:
v - a Vector value

GroupThing

public GroupThing(java.lang.String s)
Creates a new GroupThing instance from a string.

Parameters:
s - a String value
Method Detail

create

public static Thing create(java.util.Vector v)
The create method takes a Vector of Things and creates a Thing containing a GroupThing.

Parameters:
v - a Vector value
Returns:
a Thing value

thingclass

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

get

public static java.util.Vector get(Thing thing)
                            throws HeclException
get returns a Vector containing other Things, representing a group, from a Thing.

Parameters:
thing - a Thing value
Returns:
a Vector value
Throws:
HeclException

deepcopy

public RealThing deepcopy()
                   throws HeclException
deepcopy makes a copy of a GroupThing and all its elements.

Specified by:
deepcopy in interface RealThing
Returns:
a RealThing value
Throws:
HeclException

getStringRep

public java.lang.String getStringRep()
getStringRep returns a string representation of the group.

Specified by:
getStringRep in interface RealThing
Returns:
a String value