org.apache.lucene.queryParser.core.util
Class UnescapedCharSequence

java.lang.Object
  extended by org.apache.lucene.queryParser.core.util.UnescapedCharSequence
All Implemented Interfaces:
CharSequence

public final class UnescapedCharSequence
extends Object
implements CharSequence

CharsSequence with escaped chars information.


Constructor Summary
UnescapedCharSequence(char[] chars, boolean[] wasEscaped, int offset, int length)
          Create a escaped CharSequence
UnescapedCharSequence(CharSequence text)
          Create a non-escaped CharSequence
 
Method Summary
 char charAt(int index)
           
 int length()
           
 CharSequence subSequence(int start, int end)
           
static CharSequence toLowerCase(CharSequence text)
           
 String toString()
           
 String toStringEscaped()
          Return a escaped String
 String toStringEscaped(char[] enabledChars)
          Return a escaped String
static boolean wasEscaped(CharSequence text, int index)
           
 boolean wasEscaped(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnescapedCharSequence

public UnescapedCharSequence(char[] chars,
                             boolean[] wasEscaped,
                             int offset,
                             int length)
Create a escaped CharSequence

Parameters:
chars -
wasEscaped -
offset -
length -

UnescapedCharSequence

public UnescapedCharSequence(CharSequence text)
Create a non-escaped CharSequence

Parameters:
text -
Method Detail

charAt

public char charAt(int index)
Specified by:
charAt in interface CharSequence

length

public int length()
Specified by:
length in interface CharSequence

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object

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)


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.