Migrate toward java.util.function
- Package-private changes only - Maintains binary and source compatibility
This commit is contained in:
parent
7ec4e0c3e9
commit
54cc2a9c77
|
@ -678,7 +678,7 @@ public class IterableUtils {
|
||||||
|
|
||||||
if (predicates.length < 1) {
|
if (predicates.length < 1) {
|
||||||
// return the entire input collection as a single partition
|
// return the entire input collection as a single partition
|
||||||
final R singlePartition = partitionFactory.create();
|
final R singlePartition = partitionFactory.get();
|
||||||
CollectionUtils.addAll(singlePartition, iterable);
|
CollectionUtils.addAll(singlePartition, iterable);
|
||||||
return Collections.singletonList(singlePartition);
|
return Collections.singletonList(singlePartition);
|
||||||
}
|
}
|
||||||
|
@ -688,7 +688,7 @@ public class IterableUtils {
|
||||||
final int numberOfPartitions = numberOfPredicates + 1;
|
final int numberOfPartitions = numberOfPredicates + 1;
|
||||||
final List<R> partitions = new ArrayList<>(numberOfPartitions);
|
final List<R> partitions = new ArrayList<>(numberOfPartitions);
|
||||||
for (int i = 0; i < numberOfPartitions; ++i) {
|
for (int i = 0; i < numberOfPartitions; ++i) {
|
||||||
partitions.add(partitionFactory.create());
|
partitions.add(partitionFactory.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// for each element in inputCollection:
|
// for each element in inputCollection:
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class CloneTransformer<T> implements Transformer<T, T> {
|
||||||
if (input == null) {
|
if (input == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return PrototypeFactory.prototypeFactory(input).create();
|
return PrototypeFactory.prototypeFactory(input).get();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class FactoryTransformer<I, O> implements Transformer<I, O>, Serializable
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public O transform(final I input) {
|
public O transform(final I input) {
|
||||||
return iFactory.create();
|
return iFactory.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class LazyList<E> extends AbstractSerializableListDecorator<E> {
|
||||||
|
|
||||||
private E element(final int index) {
|
private E element(final int index) {
|
||||||
if (factory != null) {
|
if (factory != null) {
|
||||||
return factory.create();
|
return factory.get();
|
||||||
}
|
}
|
||||||
if (transformer != null) {
|
if (transformer != null) {
|
||||||
return transformer.transform(index);
|
return transformer.transform(index);
|
||||||
|
|
Loading…
Reference in New Issue