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
true
if the nextchar
that will be read isc
. - at(int, char) - Method in class net.sherst.io.LookAheadReader
-
Returns
true
if then
thchar
that will be read isc
, counting from 0 (at(0, 'x')
tests the firstchar
that will be read). - at(E) - Method in class net.sherst.util.BlockingRingBuffer
-
Returns
true
if 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
true
if 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
true
if 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
true
if 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
true
if 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
true
if 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
true
if the nextchars
that will be read is#
. - atEOF() - Method in class net.sherst.io.LookAheadReader
-
Returns
true
if all thechars
s have been read. - atEOL() - Method in class net.sherst.io.LookAheadReader
- atSkip(char) - Method in class net.sherst.io.LookAheadReader
-
If the next
char
that will be read isc
, returnstrue
and removesc
from 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
o
usingObjects.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
o
usingObjects.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
o
usingObjects.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
a
usingObjects.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
a
usingObjects.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
a
usingObjects.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
char
s that will be read match theString
s
, returnstrue
and removes thechar
s from the input. - atSkipComment() - Method in class net.sherst.io.LookAheadReader
-
If the next characters to be read will be a "comment", returns
true
and removes the comment from the input. - atSkipWhitespaceChar() - Method in class net.sherst.io.LookAheadReader
-
If the next
char
that will be read will be a white space character, returnstrue
and removes thechar
from 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
true
if the nextchar
that 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
LookAheadReader
and the wrappedjava.lang.Reader
. - contains(E) - Method in class net.sherst.util.FastRingBuffer
-
Returns
true
if 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
true
if the buffer is empty. - isEmpty() - Method in class net.sherst.util.FastRingBuffer
-
Returns
true
if the buffer is empty. - isEmpty() - Method in class net.sherst.util.SafeRingBuffer
-
Returns
true
if 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
Reader
which 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
LookAheadReader
which wraps the providedReader
with the default lookahead limit of 128 characters. - LookAheadReader(Reader, int) - Constructor for class net.sherst.io.LookAheadReader
-
Creates a new
LookAheadReader
which wraps the providedReader
with 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
true
if 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
char
that 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
n
thchar
that will be read, counting from 0 (peek(0)
returns the firstchar
that will be read). - peek(int) - Method in class net.sherst.util.BlockingRingBuffer
-
Returns the
n
th element that will be removed from the buffer, counting from 0 (peek(0)
returns the first element that will be removed), ornull
if the buffer does not contain that many elements. - peek(int) - Method in class net.sherst.util.FastRingBuffer
-
Returns the
n
th element that will be removed from the buffer, counting from 0 (peek(0)
returns the first element that will be removed), ornull
if the buffer does not contain that many elements. - peek(int) - Method in class net.sherst.util.SafeRingBuffer
-
Returns the
n
th element that will be removed from the buffer, counting from 0 (peek(0)
returns the first element that will be removed), ornull
if 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
null
if the buffer is empty. - poll() - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns the element at the head of the buffer, or
null
if the buffer is empty. - poll() - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns the element at the head of the buffer, or
null
if the buffer is empty. - poll(int, Class<E>) - Method in class net.sherst.util.BlockingRingBuffer
-
Removes and returns
n
consecutive elements from the head of the buffer in the order they were added, ornull
if the buffer does not containn
elements. - poll(int, Class<E>) - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns
n
consecutive elements from the head of the buffer in the order they were added, ornull
if the buffer does not containn
elements. - poll(int, Class<E>) - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns
n
consecutive elements from the head of the buffer in the order they were added, ornull
if the buffer does not containn
elements.
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
true
if 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
null
if the buffer is empty. - remove() - Method in class net.sherst.util.FastRingBuffer
-
Removes and returns the element at the head of the buffer, or
null
if the buffer is empty. - remove() - Method in class net.sherst.util.SafeRingBuffer
-
Removes and returns the element at the head of the buffer, or
null
if the buffer is empty. - remove(int, Class<E>) - Method in class net.sherst.util.BlockingRingBuffer
-
Removes and returns up to
n
consecutive 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
n
consecutive 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
n
consecutive 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
n
elements from the head of the buffer (and discards them). - skip(int) - Method in class net.sherst.util.FastRingBuffer
-
Removes
n
elements from the head of the buffer (and discards them). - skip(int) - Method in class net.sherst.util.SafeRingBuffer
-
Removes
n
elements 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