dk.rode.thesis.flyweight
Class Whitespace
java.lang.Object
dk.rode.thesis.flyweight.AbstractCharacter
dk.rode.thesis.flyweight.Whitespace
- All Implemented Interfaces:
- Character, Textual<Character>, Stringable<Character>, CharSequence, Comparable<Character>
@Participant(value="ConcreteFlyweight")
public class Whitespace
- extends AbstractCharacter
A whitespace represents a single white
space character.
- Author:
- Gunni Rode / rode.dk
Field Summary |
(package private) static String |
space
White space representation. |
Constructor Summary |
Whitespace()
No-arg constructor. |
space
static final String space
- White space representation.
No internal state as all white space is represented as
a single space... Tabs and newlines considered harmful... :)
- See Also:
- Constant Field Values
Whitespace
Whitespace()
- No-arg constructor.
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.