Index
All Classes|All Packages
A
- add(E) - Method in class net.sherst.util.BlockingRingBuffer
-
Adds an element to the buffer.
- add(E) - Method in class net.sherst.util.FastRingBuffer
-
Adds an element to the buffer.
- add(E) - Method in class net.sherst.util.SafeRingBuffer
-
Adds an element to the buffer.
- addAll(E[]) - Method in class net.sherst.util.BlockingRingBuffer
-
Adds elements to the buffer, preserving their ordering in the array.
- addAll(E[]) - Method in class net.sherst.util.FastRingBuffer
-
Adds elements to the buffer, preserving their ordering in the array.
- addAll(E[]) - Method in class net.sherst.util.SafeRingBuffer
-
Adds elements to the buffer, preserving their ordering in the array.
- addAll(Collection<E>) - Method in class net.sherst.util.BlockingRingBuffer
-
Adds elements to the buffer, preserving their ordering in the collection.
- addAll(Collection<E>) - Method in class net.sherst.util.FastRingBuffer
-
Adds elements to the buffer, preserving their ordering in the collection.
- addAll(Collection<E>) - Method in class net.sherst.util.SafeRingBuffer
-
Adds elements to the buffer, preserving their ordering in the collection.
- at(char) - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif the nextcharthat will be read isc. - at(int, char) - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif thenthcharthat will be read isc, counting from 0 (at(0, 'x')tests the firstcharthat will be read). - at(E) - Method in class net.sherst.util.BlockingRingBuffer
-
Returns
trueif the head of the buffer (the next element that will be removed) is equal too, compared usingObjects.equals(java.lang.Object, java.lang.Object). - at(E) - Method in class net.sherst.util.FastRingBuffer
-
Returns
trueif the head of the buffer (the next element that will be removed) is equal too, compared usingObjects.equals(java.lang.Object, java.lang.Object). - at(E) - Method in class net.sherst.util.SafeRingBuffer
-
Returns
trueif the head of the buffer (the next element that will be removed) is equal too, compared usingObjects.equals(java.lang.Object, java.lang.Object). - at(E[]) - Method in class net.sherst.util.BlockingRingBuffer
-
Returns
trueif the elements at the head of the buffer (the next elements that will be removed) are equal to the contents ofa, compared usingObjects.equals(java.lang.Object, java.lang.Object). - at(E[]) - Method in class net.sherst.util.FastRingBuffer
-
Returns
trueif the elements at the head of the buffer (the next elements that will be removed) are equal to the contents ofa, compared usingObjects.equals(java.lang.Object, java.lang.Object). - at(E[]) - Method in class net.sherst.util.SafeRingBuffer
-
Returns
trueif the elements at the head of the buffer (the next elements that will be removed) are equal to the contents ofa, compared usingObjects.equals(java.lang.Object, java.lang.Object). - at(String) - Method in class net.sherst.io.LookAheadReader
- atComment() - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif the nextcharsthat will be read is#. - atEOF() - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif all thecharss have been read. - atEOL() - Method in class net.sherst.io.LookAheadReader
- atSkip(char) - Method in class net.sherst.io.LookAheadReader
-
If the next
charthat will be read isc, returnstrueand removescfrom the input. - atSkip(E) - Method in class net.sherst.util.BlockingRingBuffer
-
Compares the head of the buffer (the next element that will be removed) to
ousingObjects.equals(java.lang.Object, java.lang.Object)and removes it from the buffer if there is a match. - atSkip(E) - Method in class net.sherst.util.FastRingBuffer
-
Compares the head of the buffer (the next element that will be removed) to
ousingObjects.equals(java.lang.Object, java.lang.Object)and removes it from the buffer if there is a match. - atSkip(E) - Method in class net.sherst.util.SafeRingBuffer
-
Compares the head of the buffer (the next element that will be removed) to
ousingObjects.equals(java.lang.Object, java.lang.Object)and removes it from the buffer if there is a match. - atSkip(E[]) - Method in class net.sherst.util.BlockingRingBuffer
-
Compares the head of the buffer (the next elements that will be removed) to
ausingObjects.equals(java.lang.Object, java.lang.Object)and removes them from the buffer if there is a match. - atSkip(E[]) - Method in class net.sherst.util.FastRingBuffer
-
Compares the head of the buffer (the next elements that will be removed) to
ausingObjects.equals(java.lang.Object, java.lang.Object)and removes them from the buffer if there is a match. - atSkip(E[]) - Method in class net.sherst.util.SafeRingBuffer
-
Compares the head of the buffer (the next elements that will be removed) to
ausingObjects.equals(java.lang.Object, java.lang.Object)and removes them from the buffer if there is a match. - atSkip(String) - Method in class net.sherst.io.LookAheadReader
-
If the next
chars that will be read match theStrings, returnstrueand removes thechars from the input. - atSkipComment() - Method in class net.sherst.io.LookAheadReader
-
If the next characters to be read will be a "comment", returns
trueand removes the comment from the input. - atSkipWhitespaceChar() - Method in class net.sherst.io.LookAheadReader
-
If the next
charthat will be read will be a white space character, returnstrueand removes thecharfrom the input. - atSkipWord(String) - Method in class net.sherst.io.LookAheadReader
-
If the "word" that will be read matches
w(and no other word). - atWhitespace() - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif the nextcharthat will be read will be a white space character. - atWord(String) - Method in class net.sherst.io.LookAheadReader
-
Returns true if the "word" that will be read matches
w(and no other word).
B
- BlockingRingBuffer<E> - Class in net.sherst.util
-
A modified (blocking) thread-safe ring buffer (circular buffer) implementation for Java.
- BlockingRingBuffer(int) - Constructor for class net.sherst.util.BlockingRingBuffer
-
Creates a new buffer.
C
- capacity - Variable in class net.sherst.util.FastRingBuffer
- clear() - Method in class net.sherst.util.BlockingRingBuffer
-
Empties the buffer.
- clear() - Method in class net.sherst.util.FastRingBuffer
-
Empties the buffer.
- clear() - Method in class net.sherst.util.SafeRingBuffer
-
Empties the buffer.
- close() - Method in class net.sherst.io.LookAheadReader
-
Closes the
LookAheadReaderand the wrappedjava.lang.Reader. - contains(E) - Method in class net.sherst.util.FastRingBuffer
-
Returns
trueif the buffer containse, tested usingObjects.equals(java.lang.Object, java.lang.Object). - count - Variable in class net.sherst.util.FastRingBuffer
F
- FastRingBuffer<E> - Class in net.sherst.util
-
A simple fast ring buffer (circular buffer) implementation for Java.
- FastRingBuffer(int) - Constructor for class net.sherst.util.FastRingBuffer
-
Creates a new buffer.
G
- getCapacity() - Method in class net.sherst.util.BlockingRingBuffer
-
Returns the maximum capacity of this buffer.
- getCapacity() - Method in class net.sherst.util.FastRingBuffer
-
Returns the maximum capacity of this buffer.
- getCapacity() - Method in class net.sherst.util.SafeRingBuffer
-
Returns the maximum capacity of this buffer.
I
- isDecimalDigit(char) - Static method in class net.sherst.io.LookAheadReader
- isEmpty() - Method in class net.sherst.util.BlockingRingBuffer
-
Returns
trueif the buffer is empty. - isEmpty() - Method in class net.sherst.util.FastRingBuffer
-
Returns
trueif the buffer is empty. - isEmpty() - Method in class net.sherst.util.SafeRingBuffer
-
Returns
trueif the buffer is empty. - isIdentifierChar(char) - Static method in class net.sherst.io.LookAheadReader
- isIdentifierStart(char) - Static method in class net.sherst.io.LookAheadReader
- isWhitespace(char) - Static method in class net.sherst.io.LookAheadReader
L
- LookAheadReader - Class in net.sherst.io
-
Wrapper for any
Readerwhich provides look-ahead methods (at,atSkip,atWordSkip,peek) and some useful utility methods (readChar(),atEOF(),skipWhitespaceAndComments()). - LookAheadReader(Reader) - Constructor for class net.sherst.io.LookAheadReader
-
Creates a new
LookAheadReaderwhich wraps the providedReaderwith the default lookahead limit of 128 characters. - LookAheadReader(Reader, int) - Constructor for class net.sherst.io.LookAheadReader
-
Creates a new
LookAheadReaderwhich wraps the providedReaderwith specified lookahead limit.
M
- mark(int) - Method in class net.sherst.io.LookAheadReader
-
Marks the present position in the stream.
- markSupported() - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif this reader supports themark(int)operation, which it does, but only up to the maximum capacity of the buffer.
N
- net.sherst.io - package net.sherst.io
- net.sherst.util - package net.sherst.util
O
- offer(E) - Method in class net.sherst.util.BlockingRingBuffer
-
Adds an element to the buffer if there is space for it.
- offer(E) - Method in class net.sherst.util.FastRingBuffer
-
Adds an element to the buffer if there is space for it.
- offer(E) - Method in class net.sherst.util.SafeRingBuffer
-
Adds an element to the buffer if there is space for it.
- offer(E[]) - Method in class net.sherst.util.BlockingRingBuffer
-
Adds elements to the buffer if there is space for them.
- offer(E[]) - Method in class net.sherst.util.FastRingBuffer
-
Adds elements to the buffer if there is space for them.
- offer(E[]) - Method in class net.sherst.util.SafeRingBuffer
-
Adds elements to the buffer if there is space for them.
- offer(Collection<E>) - Method in class net.sherst.util.BlockingRingBuffer
-
Adds elements to the buffer if there is space for them.
- offer(Collection<E>) - Method in class net.sherst.util.FastRingBuffer
-
Adds elements to the buffer if there is space for them.
- offer(Collection<E>) - Method in class net.sherst.util.SafeRingBuffer
-
Adds elements to the buffer if there is space for them.
P
- peek() - Method in class net.sherst.io.LookAheadReader
-
Returns the next
charthat will be read. - peek() - Method in class net.sherst.util.BlockingRingBuffer
-
Returns the head of the buffer (the next element that will be removed) without actually removing it.
- peek() - Method in class net.sherst.util.FastRingBuffer
-
Returns the head of the buffer (the next element that will be removed) without actually removing it.
- peek() - Method in class net.sherst.util.SafeRingBuffer
-
Returns the head of the buffer (the next element that will be removed) without actually removing it.
- peek(int) - Method in class net.sherst.io.LookAheadReader
-
Returns the
nthcharthat will be read, counting from 0 (peek(0)returns the firstcharthat will be read). - peek(int) - Method in class net.sherst.util.BlockingRingBuffer
-
Returns the
nth element that will be removed from the buffer, counting from 0 (peek(0)returns the first element that will be removed), ornullif the buffer does not contain that many elements. - peek(int) - Method in class net.sherst.util.FastRingBuffer
-
Returns the
nth element that will be removed from the buffer, counting from 0 (peek(0)returns the first element that will be removed), ornullif the buffer does not contain that many elements. - peek(int) - Method in class net.sherst.util.SafeRingBuffer
-
Returns the
nth element that will be removed from the buffer, counting from 0 (peek(0)returns the first element that will be removed), ornullif the buffer does not contain that many elements. - poll() - Method in class net.sherst.util.BlockingRingBuffer
-
Removes and returns the element at the head of the buffer, or
nullif the buffer is empty. - poll() - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns the element at the head of the buffer, or
nullif the buffer is empty. - poll() - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns the element at the head of the buffer, or
nullif the buffer is empty. - poll(int, Class<E>) - Method in class net.sherst.util.BlockingRingBuffer
-
Removes and returns
nconsecutive elements from the head of the buffer in the order they were added, ornullif the buffer does not containnelements. - poll(int, Class<E>) - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns
nconsecutive elements from the head of the buffer in the order they were added, ornullif the buffer does not containnelements. - poll(int, Class<E>) - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns
nconsecutive elements from the head of the buffer in the order they were added, ornullif the buffer does not containnelements.
R
- read() - Method in class net.sherst.io.LookAheadReader
-
Reads a single character.
- read(char[], int, int) - Method in class net.sherst.io.LookAheadReader
-
Reads characters into a portion of an array.
- readChar() - Method in class net.sherst.io.LookAheadReader
-
Reads a single character.
- ready() - Method in class net.sherst.io.LookAheadReader
-
Returns
trueif this reader is ready to be read. - remove() - Method in class net.sherst.util.BlockingRingBuffer
-
Removes and returns the element at the head of the buffer, or
nullif the buffer is empty. - remove() - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns the element at the head of the buffer, or
nullif the buffer is empty. - remove() - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns the element at the head of the buffer, or
nullif the buffer is empty. - remove(int, Class<E>) - Method in class net.sherst.util.BlockingRingBuffer
-
Removes and returns up to
nconsecutive elements from the head of the buffer in the order they were added. - remove(int, Class<E>) - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns up to
nconsecutive elements from the head of the buffer in the order they were added. - remove(int, Class<E>) - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns up to
nconsecutive elements from the head of the buffer in the order they were added. - removeAll() - Method in class net.sherst.util.BlockingRingBuffer
-
Empties the buffer.
- removeAll() - Method in class net.sherst.util.FastRingBuffer
-
Empties the buffer.
- removeAll() - Method in class net.sherst.util.SafeRingBuffer
-
Empties the buffer.
- reset() - Method in class net.sherst.io.LookAheadReader
-
Repositions the reader to the mark.
S
- SafeRingBuffer<E> - Class in net.sherst.util
-
A thread-safe ring buffer (circular buffer) implementation for Java.
- SafeRingBuffer(int) - Constructor for class net.sherst.util.SafeRingBuffer
-
Creates a new buffer.
- size() - Method in class net.sherst.util.BlockingRingBuffer
-
Returns the number of elements in the buffer.
- size() - Method in class net.sherst.util.FastRingBuffer
-
Returns the number of elements in the buffer.
- size() - Method in class net.sherst.util.SafeRingBuffer
-
Returns the number of elements in the buffer.
- skip(int) - Method in class net.sherst.util.BlockingRingBuffer
-
Removes
nelements from the head of the buffer (and discards them). - skip(int) - Method in class net.sherst.util.FastRingBuffer
-
Removes
nelements from the head of the buffer (and discards them). - skip(int) - Method in class net.sherst.util.SafeRingBuffer
-
Removes
nelements from the head of the buffer (and discards them). - skip(long) - Method in class net.sherst.io.LookAheadReader
-
Skips characters.
- skipWhitespaceAndComments() - Method in class net.sherst.io.LookAheadReader
-
Skips white space and comments.
T
- toList() - Method in class net.sherst.util.FastRingBuffer
All Classes|All Packages