|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hecl.ListThing
public class ListThing
The ListThing
class implements lists, storing them internally
as a Vector.
Field Summary | |
---|---|
protected java.util.Vector |
val
|
Constructor Summary | |
---|---|
ListThing()
Creates a new, empty ListThing instance. |
|
ListThing(java.lang.String s)
Attempts to create a new ListThing instance from a string. |
|
ListThing(java.util.Vector v)
Creates a new ListThing instance from a vector. |
Method Summary | |
---|---|
static java.lang.StringBuffer |
appendListItem(java.lang.StringBuffer buf,
Thing thing)
|
static Thing |
create(java.util.Vector v)
create allocates and returns a new ListThing typed Thing. |
RealThing |
deepcopy()
deepcopy copies a list and all of its elements. |
static java.util.Vector |
get(Thing thing)
get attempts to transform the given Thing into a List, and
return its Vector value. |
static Thing[] |
getArray(Thing thing)
getArray attempts to transform the given Thing
into a List, and return it as an array of Things. |
java.lang.String |
getStringRep()
getStringRep returns a string representation of a
ListThing. |
java.lang.String |
thingclass()
|
static java.lang.String |
toListString(Thing thing)
toListString transforms list elements into the
string form {foo bar} if the element contains a space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector val
Constructor Detail |
---|
public ListThing()
ListThing
instance.
public ListThing(java.util.Vector v)
ListThing
instance from a vector.
v
- a Vector
valuepublic ListThing(java.lang.String s) throws HeclException
ListThing
instance from a string.
May fail if the string can't be parsed into a list.
s
- a String
value
HeclException
- if an error occursMethod Detail |
---|
public static Thing create(java.util.Vector v)
create
allocates and returns a new ListThing typed Thing.
v
- a Vector
value
Thing
valuepublic java.lang.String thingclass()
thingclass
in interface RealThing
public static java.util.Vector get(Thing thing) throws HeclException
get
attempts to transform the given Thing into a List, and
return its Vector value.
thing
- a Thing
value
Vector
value
HeclException
- if an error occurspublic static Thing[] getArray(Thing thing) throws HeclException
getArray
attempts to transform the given Thing
into a List, and return it as an array of Things.
thing
- a Thing
value
Thing[]
value
HeclException
- if an error occurspublic RealThing deepcopy() throws HeclException
deepcopy
copies a list and all of its elements.
deepcopy
in interface RealThing
RealThing
value
HeclException
public static java.lang.String toListString(Thing thing)
toListString
transforms list elements into the
string form {foo bar} if the element contains a space.
thing
- a Thing
value
String
valuepublic static java.lang.StringBuffer appendListItem(java.lang.StringBuffer buf, Thing thing)
public java.lang.String getStringRep()
getStringRep
returns a string representation of a
ListThing.
getStringRep
in interface RealThing
String
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |