Class UnescapedCharSequence
- java.lang.Object
-
- org.apache.lucene.queryparser.flexible.core.util.UnescapedCharSequence
-
- All Implemented Interfaces:
CharSequence
public final class UnescapedCharSequence extends Object implements CharSequence
CharsSequence with escaped chars information.
-
-
Constructor Summary
Constructors Constructor Description UnescapedCharSequence(char[] chars, boolean[] wasEscaped, int offset, int length)
Create a escaped CharSequenceUnescapedCharSequence(CharSequence text)
Create a non-escaped CharSequence
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description char
charAt(int index)
int
length()
CharSequence
subSequence(int start, int end)
static CharSequence
toLowerCase(CharSequence text, Locale locale)
String
toString()
String
toStringEscaped()
Return a escaped StringString
toStringEscaped(char[] enabledChars)
Return a escaped Stringboolean
wasEscaped(int index)
static boolean
wasEscaped(CharSequence text, int index)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Constructor Detail
-
UnescapedCharSequence
public UnescapedCharSequence(char[] chars, boolean[] wasEscaped, int offset, int length)
Create a escaped CharSequence
-
UnescapedCharSequence
public UnescapedCharSequence(CharSequence text)
Create a non-escaped CharSequence
-
-
Method Detail
-
charAt
public char charAt(int index)
- Specified by:
charAt
in interfaceCharSequence
-
length
public int length()
- Specified by:
length
in interfaceCharSequence
-
subSequence
public CharSequence subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
-
toString
public String toString()
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
toStringEscaped
public String toStringEscaped()
Return a escaped String- Returns:
- a escaped String
-
toStringEscaped
public String toStringEscaped(char[] enabledChars)
Return a escaped String- Parameters:
enabledChars
- - array of chars to be escaped- Returns:
- a escaped String
-
wasEscaped
public boolean wasEscaped(int index)
-
wasEscaped
public static final boolean wasEscaped(CharSequence text, int index)
-
toLowerCase
public static CharSequence toLowerCase(CharSequence text, Locale locale)
-
-