Package jodd.util

Class CharArraySequence

  • All Implemented Interfaces:
    java.lang.CharSequence

    public class CharArraySequence
    extends java.lang.Object
    implements java.lang.CharSequence
    Simple CharSequence wrapper of the char array.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.CharSequence EMPTY  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      char charAt​(int index)  
      static CharArraySequence from​(char[] value, int offset, int len)
      Static constructor that creates a char sequence by making a copy of provided char array.
      int length()  
      static CharArraySequence of​(char... value)
      Static constructor that creates a char sequence using provided char array.
      static CharArraySequence of​(char[] value, int offset, int len)  
      java.lang.CharSequence subSequence​(int start, int end)  
      java.lang.String toString()  
      • 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
    • Field Detail

      • EMPTY

        public static final java.lang.CharSequence EMPTY
    • Constructor Detail

      • CharArraySequence

        public CharArraySequence​(char[] value)
      • CharArraySequence

        public CharArraySequence​(char[] value,
                                 int offset,
                                 int length)
    • Method Detail

      • of

        public static CharArraySequence of​(char... value)
        Static constructor that creates a char sequence using provided char array.
      • from

        public static CharArraySequence from​(char[] value,
                                             int offset,
                                             int len)
        Static constructor that creates a char sequence by making a copy of provided char array.
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class java.lang.Object
      • charAt

        public char charAt​(int index)
        Specified by:
        charAt in interface java.lang.CharSequence
      • subSequence

        public java.lang.CharSequence subSequence​(int start,
                                                  int end)
        Specified by:
        subSequence in interface java.lang.CharSequence