Migrate toward java.util.function

- Package-private changes only
- Maintains binary and source compatibility
This commit is contained in:
Gary Gregory 2024-07-11 09:49:01 -04:00
parent ee307055b7
commit e42f60b041
3 changed files with 5 additions and 5 deletions

View File

@ -108,7 +108,7 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
* @since 3.1
*/
public Transformer<? super T, ? extends T>[] getTransformers() {
return FunctorUtils.<T, T>copy(iTransformers);
return FunctorUtils.copy(iTransformers);
}
/**

View File

@ -111,17 +111,17 @@ final class FunctorUtils {
}
/**
* Copy method
* Copy method.
*
* @param transformers the transformers to copy
* @return a clone of the transformers
*/
@SuppressWarnings("unchecked")
static <I, O> Transformer<I, O>[] copy(final Transformer<? super I, ? extends O>... transformers) {
static <T extends Function<?, ?>> T[] copy(final T... transformers) {
if (transformers == null) {
return null;
}
return (Transformer<I, O>[]) transformers.clone();
return transformers.clone();
}
/**

View File

@ -174,7 +174,7 @@ public class SwitchTransformer<I, O> implements Transformer<I, O>, Serializable
* @since 3.1
*/
public Transformer<? super I, ? extends O>[] getTransformers() {
return FunctorUtils.<I, O>copy(iTransformers);
return FunctorUtils.copy(iTransformers);
}
/**