/** * Returns a transformed sorted set backed by the given set. * <p> * Each object is passed through the transformer as it is added to the * Set. It is important not to use the original set after invoking this * method, as it is a backdoor for adding untransformed objects. * <p> * Existing entries in the specified set will not be transformed. * If you want that behaviour, see {@link TransformedSortedSet#transformedSortedSet}. * * @param <E> the element type * @param set the set to transform, must not be null * @param transformer the transformer for the set, must not be null * @return a transformed set backed by the given set * @throws NullPointerException if the set or transformer is null */ public static <E> SortedSet<E> transformedSortedSet(final SortedSet<E> set, final Transformer<? super E, ? extends E> transformer) { return TransformedSortedSet.transformingSortedSet(set, transformer); }