dk.rode.thesis.flyweight
Class Symbol
java.lang.Object
dk.rode.thesis.flyweight.AbstractCharacter
dk.rode.thesis.flyweight.Symbol
- All Implemented Interfaces:
- Character, Textual<Character>, Stringable<Character>, CharSequence, Comparable<Character>
@Participant(value="ConcreteFlyweight")
public class Symbol
- extends AbstractCharacter
A symbol represents a single symbol that
is not a whitespace
or a letter
.
Digits are also considered symbols.
- Author:
- Gunni Rode / rode.dk
Field Summary |
private char |
symbol
The actual shared symbol. |
Constructor Summary |
Symbol(char symbol)
Constructor. |
symbol
private final char symbol
- The actual shared symbol.
Symbol
Symbol(char symbol)
- Constructor.
- Parameters:
symbol
-
charAt
public final char charAt(int index)
compareTo
public final int compareTo(Character character)
length
public final int length()
subSequence
public final CharSequence subSequence(int start,
int end)
toString
public final String toString()
- Specified by:
toString
in interface CharSequence
- Overrides:
toString
in class Object
Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!
The original thesis and source code are available at rode.dk/thesis.