@SuppressWarnings("unchecked") @Override public Array<T> sorted(Comparator<? super T> comparator) { final Object[] arr = toArray(this); Arrays.sort(arr, (o1, o2) -> comparator.compare((T) o1, (T) o2)); return wrap(arr); }
@Override public Array<T> sorted() { final Object[] arr = toArray(this); Arrays.sort(arr); return wrap(arr); }