Package org.apache.solr.search
Class StrParser
java.lang.Object
org.apache.solr.search.StrParser
Simple class to help with parsing a string. Note: This API is experimental and may change in
non backward-compatible ways in the future
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharch()voideatws()voidbytegetByte()doublefloatgetFloat()getGlobbedId(String errMessage) getId()intgetInt()Skips leading whitespace and returns whatever sequence of non whitespace it can find (or hte empty string)Sort direction or null if current position does not indicate a sort direction.booleanopt(char ch) booleancharpeek()charpeekChar()voidskip(int nChars) toString()
-
Field Details
-
val
-
pos
public int pos -
end
public int end
-
-
Constructor Details
-
StrParser
-
StrParser
-
-
Method Details
-
eatws
public void eatws() -
ch
public char ch() -
skip
public void skip(int nChars) -
opt
-
opt
public boolean opt(char ch) -
expect
- Throws:
SyntaxError
-
getFloat
public float getFloat() -
getNumber
-
getDouble
public double getDouble() -
getInt
public int getInt() -
getByte
public byte getByte() -
getId
- Throws:
SyntaxError
-
getId
- Throws:
SyntaxError
-
getGlobbedId
- Throws:
SyntaxError
-
getSimpleString
Skips leading whitespace and returns whatever sequence of non whitespace it can find (or hte empty string) -
getSortDirection
Sort direction or null if current position does not indicate a sort direction. (True is desc, False is asc). Position is advanced to after the comma (or end) when result is non null- Throws:
SyntaxError
-
getQuotedString
- Throws:
SyntaxError
-
peek
public char peek() -
peekChar
public char peekChar() -
toString
-