|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenlist.Symbol
public class Symbol
The Symbol class represents interned Strings. Each is guarnteed to be stored uniquely if the function intern is applied to return the reference to the symbol.
| Field Summary | |
|---|---|
(package private) java.lang.String |
printName
The printable name for this symbol. |
private static java.util.Hashtable<java.lang.String,Symbol> |
theHashtable
|
| Constructor Summary | |
|---|---|
private |
Symbol(java.lang.String printName)
Create a Symbol with the given name. |
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object other)
Compare this Symbol to another, based on String comparision of printNames. |
boolean |
equals(java.lang.Object ob)
Two Symbols are equal iff they are the same Symbol. |
static Symbol |
intern(java.lang.String name)
Intern a String as a symbol. |
java.lang.String |
toString()
the printable name of this Symbol |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static java.util.Hashtable<java.lang.String,Symbol> theHashtable
java.lang.String printName
| Constructor Detail |
|---|
private Symbol(java.lang.String printName)
printName - | Method Detail |
|---|
public static Symbol intern(java.lang.String name)
name -
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object ob)
equals in class java.lang.Objectob - the Object to which this Symbol is compared for equality
public int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparableother - the Object to which this Symbol is compared
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||