|
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.IntSymbol
public class IntSymbol
IntSymbol objects associate integers with unique references.
This association is maintained in Symbol, not in
IntSymbol itself. As a consequence, the new
operator for IntSymbol cannot be invoked directly. Rather,
new symbols are created by calling Symbol.add(Integer) or Symbol.add(int).
Symbol,
StringSymbol,
Serialized Form| Constructor Summary | |
|---|---|
IntSymbol()
A public, no-arg constructor, required by the Externalizable
interface. |
|
| Method Summary | |
|---|---|
Integer |
getInteger()
Gets the internal Integer object for this
symbol. |
protected Object |
getSymKey()
Returns the key used by the internal symbol map of the class Symbol, which, for this type of symbol, is the
Integer object returned by getInteger(). |
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()
Gets a string representation 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 IntSymbol()
Externalizable
interface.
IntSymbol objects should not be created via this
constructor.
| Method Detail |
|---|
public String toString()
toString in class SymbolInteger.toString() on this object's internal Integer
object.public Integer getInteger()
Integer object for this
symbol.
getInteger in class SymbolInteger object for this
symbol.protected Object getSymKey()
Symbol, which, for this type of symbol, is the
Integer object returned by getInteger().
getSymKey in class SymbolgetInteger()
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
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 | |||||||||