Package org.owasp.esapi.codecs
Class AbstractPushbackSequence<T>
- java.lang.Object
-
- org.owasp.esapi.codecs.AbstractPushbackSequence<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
PushbackSequence<T>
- Direct Known Subclasses:
PushBackSequenceImpl,PushbackString
public abstract class AbstractPushbackSequence<T> extends java.lang.Object implements PushbackSequence<T>
This Abstract class provides the generic logic for using aPushbackSequencein regards to iterating strings. The final Impl is intended for the user to supply a type T such that the pushback interface can be utilized for sequences of type T. Presently this generic class is limited by the fact that input is a String.- Author:
- Matt Seil
-
-
Constructor Summary
Constructors Constructor Description AbstractPushbackSequence(java.lang.String input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Determine if this sequence has another element.intindex()Get the current index of the PushbackString.voidpushback(T c)
-
-
-
Method Detail
-
pushback
public void pushback(T c)
- Specified by:
pushbackin interfacePushbackSequence<T>
-
index
public int index()
Get the current index of the PushbackString. Typically used in error messages.- Specified by:
indexin interfacePushbackSequence<T>- Returns:
- The current index of the PushbackSequence.
-
hasNext
public boolean hasNext()
Determine if this sequence has another element.- Specified by:
hasNextin interfacePushbackSequence<T>- Returns:
- True if there is another element in this sequence. False otherwise.
-
-