T - the type of the decoded WKT.abstract class AbstractWktDecoder<T>
extends java.lang.Object
This class does not implement interface WktDecoder because it contains shared code to be used both in CrsWktDecoder and the Geometry WktDecoders.
AbstractWktDecoders are not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
protected WktToken |
currentToken |
private AbstractWktTokenizer |
tokenizer |
private WktVariant |
wktVariant |
| Constructor and Description |
|---|
AbstractWktDecoder(WktVariant wktVariant)
The constructor of this AbstractWktDecoder.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
decodeInt() |
protected double |
decodeNumber()
Returns the value of the current token and moves to the next token if the current token matches a number.
|
protected java.lang.String |
decodeText()
Returns the text and moves to the next token if the current token matches text, otherwise throws an exception.
|
protected int |
getTokenizerPosition()
Reports the current position of the tokenizer.
|
protected WktVariant |
getWktVariant()
Returns the
WktVariant for this decoder. |
protected boolean |
matchesCloseList()
Returns true and moves to the next token if the current token matches the close list token.
|
protected boolean |
matchesElementSeparator()
Returns true and moves to the next token if the current token matches the element separator token.
|
protected boolean |
matchesOpenList()
Returns true and moves to the next token if the current token matches the open list token.
|
protected void |
nextToken()
Advances the decoding to the next token.
|
protected void |
setTokenizer(AbstractWktTokenizer tokenizer) |
private final WktVariant wktVariant
protected WktToken currentToken
private AbstractWktTokenizer tokenizer
public AbstractWktDecoder(WktVariant wktVariant)
wktVariant - The WktVariant to be used by this decoder.protected void setTokenizer(AbstractWktTokenizer tokenizer)
protected java.lang.String decodeText()
WktDecodeException - when the current token does not match text.protected int decodeInt()
protected void nextToken()
protected boolean matchesOpenList()
protected boolean matchesCloseList()
protected boolean matchesElementSeparator()
protected double decodeNumber()
WktDecodeException - if the current token does not match a number.protected WktVariant getWktVariant()
WktVariant for this decoder.WktVariant for this decoder.protected int getTokenizerPosition()