Class CharArray


  • public final class CharArray
    extends Object
    Immutable array of chars.
    • Method Detail

      • from

        public static CharArray from​(char[] a)
        Creates an instance of this class.
        Parameters:
        a - an array of chars.
        Returns:
        a new instance
      • get

        public char get​(int index)
        Return the char at a position.
        Parameters:
        index - the position
        Returns:
        a char
      • length

        public int length()
        Returns the array length.
        Returns:
        the length
      • array

        public char[] array()
        Returns copy of the array.
        Returns:
        an array of chars
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object