public static <F, T> List<T> transform(final List<F> fromList, final Function<? super F, ? extends T> function) {
        return (fromList instanceof RandomAccess) ? new TransformingRandomAccessList<>(fromList, function)
            : new TransformingSequentialList<>(fromList, function);
    }
Returns a list that applies {@code function} to each element of {@code fromList}.
The returned list is a transformed view of {@code fromList};
changes to {@code fromList} will be reflected in the returned list and vice versa.
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/Lists.java