Package com.github.weisj.jsvg.util
Class ParserBase
- java.lang.Object
-
- com.github.weisj.jsvg.util.ParserBase
-
- Direct Known Subclasses:
PathParser
public class ParserBase extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ParserBase.NumberCharState
-
Field Summary
Fields Modifier and Type Field Description private int
index
protected @NotNull java.lang.String
input
private int
inputLength
-
Constructor Summary
Constructors Constructor Description ParserBase(@NotNull java.lang.String input, int startIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
consume()
void
consumeWhiteSpaceOrSeparator()
protected @NotNull java.lang.String
currentLocation()
boolean
hasNext()
private boolean
isValidNumberChar(char c, ParserBase.NumberCharState state)
private boolean
isWhiteSpaceOrSeparator(char c)
double
nextDouble()
float
nextFloat()
protected float
nextFloatOrUnspecified()
private java.lang.String
nextNumberString()
protected char
peek()
-
-
-
Method Detail
-
peek
protected char peek()
-
consume
protected void consume()
-
hasNext
public boolean hasNext()
-
consumeWhiteSpaceOrSeparator
public void consumeWhiteSpaceOrSeparator()
-
isWhiteSpaceOrSeparator
private boolean isWhiteSpaceOrSeparator(char c)
-
nextNumberString
private java.lang.String nextNumberString()
-
nextFloatOrUnspecified
protected float nextFloatOrUnspecified()
-
nextFloat
public float nextFloat() throws java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
-
nextDouble
public double nextDouble() throws java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
-
currentLocation
@NotNull protected @NotNull java.lang.String currentLocation()
-
isValidNumberChar
private boolean isValidNumberChar(char c, ParserBase.NumberCharState state)
-
-