Class UnescapedCharSequence

  • All Implemented Interfaces:
    CharSequence

    public final class UnescapedCharSequence
    extends Object
    implements CharSequence
    CharsSequence with escaped chars information.
    • 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
      • 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)