|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hecl.StringThing
public class StringThing
The StringThing
class is the internal representation of string
types. This is somewhat special, as all types in Hecl may be represented as
strings.
Constructor Summary | |
---|---|
StringThing()
Creates a new, empty StringThing instance. |
|
StringThing(java.lang.String s)
Creates a new StringThing instance from a string. |
|
StringThing(java.lang.StringBuffer sb)
Creates a new StringThing instance from a stringbuffer. |
Method Summary | |
---|---|
void |
append(char ch)
append takes a character and appends it to the string. |
void |
append(java.lang.String str)
append appends a string to the string. |
static Thing |
create(java.lang.String s)
The create method creates and returns a newly allocated
Thing with a StringThing internal representation. |
RealThing |
deepcopy()
deepcopy copies the string. |
static java.lang.String |
get(Thing thing)
get returns a string representation of a given Thing,
transforming the thing into a string type at the same time. |
java.lang.String |
getStringRep()
getStringRep returns its internal value. |
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 StringThing()
StringThing
instance.
public StringThing(java.lang.String s)
StringThing
instance from a string.
s
- a String
valuepublic StringThing(java.lang.StringBuffer sb)
StringThing
instance from a stringbuffer.
sb
- a StringBuffer
valueMethod Detail |
---|
public java.lang.String thingclass()
thingclass
in interface RealThing
public static Thing create(java.lang.String s)
create
method creates and returns a newly allocated
Thing
with a StringThing
internal representation.
s
- A String
value which may be null
.
Thing
valuepublic static java.lang.String get(Thing thing)
get
returns a string representation of a given Thing,
transforming the thing into a string type at the same time.
thing
- a Thing
value
String
value
HeclException
public RealThing deepcopy()
deepcopy
copies the string.
deepcopy
in interface RealThing
RealThing
valuepublic java.lang.String getStringRep()
getStringRep
returns its internal value.
getStringRep
in interface RealThing
String
valuepublic void append(char ch)
append
takes a character and appends it to the string.
ch
- a char
valuepublic void append(java.lang.String str)
append
appends a string to the string.
str
- a String
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |