Migrate toward java.util.function

- Package-private changes only
- Maintains binary and source compatibility
This commit is contained in:
Gary Gregory 2024-07-11 11:31:45 -04:00
parent 7ec4e0c3e9
commit 54cc2a9c77
4 changed files with 5 additions and 5 deletions

View File

@ -678,7 +678,7 @@ public class IterableUtils {
if (predicates.length < 1) {
// return the entire input collection as a single partition
final R singlePartition = partitionFactory.create();
final R singlePartition = partitionFactory.get();
CollectionUtils.addAll(singlePartition, iterable);
return Collections.singletonList(singlePartition);
}
@ -688,7 +688,7 @@ public class IterableUtils {
final int numberOfPartitions = numberOfPredicates + 1;
final List<R> partitions = new ArrayList<>(numberOfPartitions);
for (int i = 0; i < numberOfPartitions; ++i) {
partitions.add(partitionFactory.create());
partitions.add(partitionFactory.get());
}
// for each element in inputCollection:

View File

@ -66,7 +66,7 @@ public class CloneTransformer<T> implements Transformer<T, T> {
if (input == null) {
return null;
}
return PrototypeFactory.prototypeFactory(input).create();
return PrototypeFactory.prototypeFactory(input).get();
}
}

View File

@ -77,7 +77,7 @@ public class FactoryTransformer<I, O> implements Transformer<I, O>, Serializable
*/
@Override
public O transform(final I input) {
return iFactory.create();
return iFactory.get();
}
}

View File

@ -131,7 +131,7 @@ public class LazyList<E> extends AbstractSerializableListDecorator<E> {
private E element(final int index) {
if (factory != null) {
return factory.create();
return factory.get();
}
if (transformer != null) {
return transformer.transform(index);