org.apache.lucene.queryparser.flexible.core.util

## 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 and Description
    `UnescapedCharSequence(char[] chars, boolean[] wasEscaped, int offset, int length)` Create a escaped CharSequence
    `UnescapedCharSequence(CharSequence text)` Create a non-escaped CharSequence

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 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

    - #### UnescapedCharSequence

          public UnescapedCharSequence(CharSequence text)

      Create a non-escaped CharSequence

  - ### 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,
                                 Locale locale)

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