org.omnaest.utils.operation.foreach
Class ForEach.Result<V>
java.lang.Object
org.omnaest.utils.structure.collection.list.decorator.ListDecorator<V>
org.omnaest.utils.operation.foreach.ForEach.Result<V>
- Type Parameters:
V -
- All Implemented Interfaces:
- Serializable, Iterable<V>, Collection<V>, List<V>
- Enclosing class:
- ForEach<E,V>
public static class ForEach.Result<V>
- extends ListDecorator<V>
ForEach.Result of a ForEach Operation which is basically an unmodifiable List of all returned
instances from the Operations.
Additionally there a some special methods.
E.g. the areAllValuesEqualTo(Object) allows to test for equality of the whole result objects:
boolean result = new ForEach<String, Boolean>( iterables ).execute( operation ).areAllValuesEqualTo( true );
- Author:
- Omnaest
- See Also:
#convert(CollectionConverter),
areAllValuesEqualTo(Object),
areNumberOfValuesEqualTo(Object, int),
isAnyValueEqualTo(Object),
Serialized Form
| Fields inherited from class org.omnaest.utils.structure.collection.list.decorator.ListDecorator |
list |
| Methods inherited from class org.omnaest.utils.structure.collection.list.decorator.ListDecorator |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, getList, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, setList, size, subList, toArray, toArray, toString |
ForEach.Result
protected ForEach.Result(List<V> list)
- Parameters:
list - - See Also:
ForEach.Result
convert
public <TO> TO convert(CollectionUtils.CollectionConverter<V,TO> collectionConverter)
- Converts the
ForEach.Result to a single value using a CollectionUtils.CollectionConverter
- Parameters:
collectionConverter -
- Returns:
areAllValuesEqualTo
public boolean areAllValuesEqualTo(V value)
- Returns true if all values of the
ForEach.Result are equal to the given value
- Parameters:
value -
- Returns:
isAnyValueEqualTo
public boolean isAnyValueEqualTo(V value)
- Returns true if any value of the result is equal to the given value
- Parameters:
value -
- Returns:
areNumberOfValuesEqualTo
public boolean areNumberOfValuesEqualTo(V value,
int number)
- Returns true if a given number of values of the result are equal to the given value
- Parameters:
value - number -
- Returns:
Copyright © 2013. All Rights Reserved.