| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectai.krr.SyntaxAdaptableSymbol
ai.krr.StringSymbol
public final class StringSymbol
 This class implements part of the foundations for symbolic programming in
 Java. A StringSymbol consists solely of its String value.
 
 As for the order of StringSymbols, it is simply defined of the
 contained Strings.
 
| Constructor Summary | |
|---|---|
StringSymbol(java.lang.String s)
This constructor creates a StringSymbol for the given char value.  | 
|
| Method Summary | |
|---|---|
 int | 
compareTo(StringSymbol strSy)
This function compares this StringSymbol to the given StringSymbol.  | 
 int | 
compareTo(Symbol sy)
This function compares this StringSymbol to the given Object, which must be a Symbol. | 
 boolean | 
equals(java.lang.Object obj)
This function tests whether this and the given object are equal.  | 
 int | 
getClassOrderIndex()
This function returns the index used for ordering Symbols across different classes.  | 
 int | 
hashCode()
This function returns the hash code of this Symbol.  | 
 java.lang.String | 
stringValue()
This function returns the value of this StringSymbol as a Java String.  | 
 java.lang.String | 
toString()
This function returns a printable representation of this StringSymbol which is simply the contained String itself.  | 
| Methods inherited from class ai.krr.SyntaxAdaptableSymbol | 
|---|
isBooleanSymbol, isNamedSymbol, isNumericSymbol, prettyPrint, read, write | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public StringSymbol(java.lang.String s)
This constructor creates a StringSymbol for the given char value. The given String should not be null.
s - the String value of this symbol| Method Detail | 
|---|
public int getClassOrderIndex()
This function returns the index used for ordering Symbols across different classes. This index of this class is defined to be zero.
public int compareTo(Symbol sy)
 This function compares this StringSymbol to the given Object, which must
 be a Symbol. AnonymousSymbols and NamedSymbols
 are considered to come after StringSymbols in the order defined here. All
 other types of Symbols are considered to come before StringSymbols.
 
sy - the Symbol to which this StringSymbol is to be compared
public final java.lang.String stringValue()
This function returns the value of this StringSymbol as a Java String.
public int compareTo(StringSymbol strSy)
This function compares this StringSymbol to the given StringSymbol. Two StringSymbols are compared by value.
strSy - the StringSymbol to which this StringSymbol is compared
public boolean equals(java.lang.Object obj)
This function tests whether this and the given object are equal. Two StringSymbols are equal if the contain the same value.
equals in class java.lang.Objectobj - the Object this should be compared to
public final int hashCode()
This function returns the hash code of this Symbol.
hashCode in class java.lang.Objectpublic java.lang.String toString()
This function returns a printable representation of this StringSymbol which is simply the contained String itself.
toString in class java.lang.Object
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||