|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanbikel.lisp.Sexp
danbikel.lisp.Symbol
danbikel.lisp.StringSymbol
public class StringSymbol
StringSymbol objects associate strings with unique references.
This association is maintained in Symbol, not in
StringSymbol itself. As a consequence, the new operator for
StringSymbol cannot be invoked directly. Rather,
new symbols should be created by calling Symbol.add(String).
Symbol,
IntSymbol,
Serialized Form| Constructor Summary | |
|---|---|
StringSymbol()
A public, no-arg constructor, required by the Externalizable
interface. |
|
| Method Summary | |
|---|---|
Integer |
getInteger()
Returns null, since this extension of Symbol
only stores strings. |
protected Object |
getSymKey()
Returns the key used by the internal symbol map of the class Symbol, which, for this type of symbol, is the
String object returned by toString(). |
void |
readExternal(ObjectInput in)
Reads this object from an ObjectInput instance. |
Object |
readResolve()
Deals with the issue of uniqueness when we are dealing with more than one VM by adding the read symbol to the symbol map, if it is not already there. |
String |
toString()
Returns the print name of this Symbol. |
void |
writeExternal(ObjectOutput out)
Writes this object to an ObjectOutput instance. |
| Methods inherited from class danbikel.lisp.Symbol |
|---|
add, add, add, clean, deepCopy, get, get, get, isList, isSymbol |
| Methods inherited from class danbikel.lisp.Sexp |
|---|
getCanonical, list, main, read, read, read, symbol |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringSymbol()
Externalizable
interface.
StringSymbol objects should not be created via this
constructor.
| Method Detail |
|---|
public String toString()
toString in class Symbolpublic Integer getInteger()
null, since this extension of Symbol
only stores strings.
getInteger in class Symbolnullprotected Object getSymKey()
Symbol, which, for this type of symbol, is the
String object returned by toString().
getSymKey in class SymboltoString().
<
public void writeExternal(ObjectOutput out)
throws IOException
ObjectOutput instance.
writeExternal in interface ExternalizablewriteExternal in class Sexpout - the object stream to which to write an object of this class
IOException - if the underlying write operation throws an
IOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
ObjectInput instance.
readExternal in interface ExternalizablereadExternal in class Sexpin - the object stream from which to read objects of this class
IOException - if the underlying read operation throws an
IOException
ClassNotFoundException - if the underlying read operation throws
an ClassNotFoundException
public Object readResolve()
throws ObjectStreamException
StringSymbol that
was read from an ObjectInput instance
ObjectStreamException - if there is a problem with the underlying
read operation
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||