public interface Symbol extends Comparable<Symbol>, HasDescriptionLength
Defines the unit of communication.
A symbol is a fixed object: its properties do not change.
Alphabet
Modifier and Type | Interface and Description |
---|---|
static interface |
Symbol.Iterable
Represents a
NearIterable that returns symbol items. |
Modifier and Type | Method and Description |
---|---|
DirectedSymbol |
createDirectedSymbol(Direction direction)
Creates a directed symbol that corresponds to the given direction and this symbol.
|
Alphabet |
getAlphabet()
Returns the alphabet that contains this symbol.
|
String |
getDenotation()
Returns the string that denotes this symbol.
|
long |
getOrdinal()
Returns the ordinal number of this symbol within the containing alphabet.
|
String |
toShortString()
Returns a short string that denotes this symbol.
|
String |
toShortString(Direction direction)
Returns a short string that denotes this symbol together with (normally preceded by) the denotation of the
given direction.
|
String |
toString(Direction direction)
Returns the string that denotes this symbol together with (normally preceded by) the denotation of the
given direction.
|
compareTo
descriptionLength
Alphabet getAlphabet()
long getOrdinal()
String getDenotation()
String toString(Direction direction)
direction
- The direction to show with this symbolString toShortString()
String toShortString(Direction direction)
direction
- The direction to show with this symbolDirectedSymbol createDirectedSymbol(Direction direction)
direction
- The direction to useCopyright © 2013. All Rights Reserved.