ai.krr
Interface Symbol

All Superinterfaces:
java.lang.Comparable<Symbol>
All Known Implementing Classes:
AnonymousSymbol, BooleanSymbol, CharacterSymbol, IntegerSymbol, NamedSymbol, NumericSymbol, RealNumberSymbol, StringSymbol, SyntaxAdaptableSymbol

public interface Symbol
extends java.lang.Comparable<Symbol>

This class implements the foundations for symbolic programming in Java.

Symbols are totally ordered across all classes implementing this interface. To perform the comparison across classes, i.e. to compare Symbols of different types, the function getClassOrderIndex() is used. This assigns a numeric index to the class that can be compared to the index of a different class. The comparison of Symbols of the same type is handled in each class.

Author:
Gerhard Wickler

Method Summary
 int getClassOrderIndex()
           This function returns the index used for ordering Symbols across different classes.
 boolean isBooleanSymbol()
           This function tests whether this Symbol is a BooleanSymbol.
 boolean isNamedSymbol()
           This function tests whether this Symbol is a NamedSymbol.
 boolean isNumericSymbol()
           This function tests whether this Symbol is a NumericSymbol.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isBooleanSymbol

boolean isBooleanSymbol()

This function tests whether this Symbol is a BooleanSymbol. This default implementation always returns false.

Returns:
true if and only if this is a BooleanSymbol

isNumericSymbol

boolean isNumericSymbol()

This function tests whether this Symbol is a NumericSymbol. This default implementation always returns false.

Returns:
true if and only if this is a NumericSymbol

isNamedSymbol

boolean isNamedSymbol()

This function tests whether this Symbol is a NamedSymbol. This default implementation always returns false.

Returns:
true if and only if this is a NamedSymbol

getClassOrderIndex

int getClassOrderIndex()

This function returns the index used for ordering Symbols across different classes.

Returns:
an integer indicating how this type of Symbol is to be ordered with respect to different types of Symbol