code: private static CharArrayList wrap(final char a[], final int length) {
          if (length > a.length)
              throw new IllegalArgumentException("The specified length (" + length + ") is greater than the array size (" + a.length + ")");
          final CharArrayList l = new CharArrayList(a, false);
          l.size = length;
          return l;
      }
docs: Wraps a given array into an array list of given size.
  <br>Note it is guaranteed that the type of the array returned by {@link #elements()} will be the same (see the comments in the class documentation).
  
  @param a      an array to wrap.
  @param length the length of the resulting array list.
  @return a new array list of the given size, wrapping the given array.