com.stevenrbrandt.ubiq2.v4.pattwo
Class Loader

java.lang.Object
  extended by com.stevenrbrandt.ubiq2.v4.pattwo.Loader
All Implemented Interfaces:
CharStream
Direct Known Subclasses:
ReaderStream

public abstract class Loader
extends java.lang.Object
implements CharStream


Constructor Summary
Loader(java.lang.CharSequence cs)
           
 
Method Summary
 char charAt(int i)
           
 boolean charAtIs(int i, char c)
           
 boolean lengthIs(int i)
          Trigger load if greater or equal.
 boolean lessThanLength(int i)
          Trigger load if greater or equal.
abstract  boolean load()
          Load more data into the CharSequence.
 boolean longerChanges()
          Since this stream grows to meet needs, then is always false.
 void reset()
          Reset not meaningful.
 java.lang.CharSequence subSequence(int a, int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Loader

public Loader(java.lang.CharSequence cs)
Method Detail

reset

public void reset()
Reset not meaningful.

Specified by:
reset in interface CharStream

longerChanges

public boolean longerChanges()
Since this stream grows to meet needs, then is always false.

Specified by:
longerChanges in interface CharStream

charAt

public char charAt(int i)
Specified by:
charAt in interface CharStream

charAtIs

public boolean charAtIs(int i,
                        char c)
Specified by:
charAtIs in interface CharStream

lessThanLength

public boolean lessThanLength(int i)
Trigger load if greater or equal.

Specified by:
lessThanLength in interface CharStream

lengthIs

public boolean lengthIs(int i)
Trigger load if greater or equal.

Specified by:
lengthIs in interface CharStream

subSequence

public java.lang.CharSequence subSequence(int a,
                                          int b)
Specified by:
subSequence in interface CharStream

load

public abstract boolean load()
Load more data into the CharSequence. Return true if it is possible to load more data still, return false if no more is available.

Specified by:
load in interface CharStream