Package org.assertj.core.presentation
Class TransformingList<FROM,TO>
java.lang.Object
java.util.AbstractCollection<TO>
java.util.AbstractList<TO>
org.assertj.core.presentation.TransformingList<FROM,TO>
- Type Parameters:
FROM
- the type to convert fromTO
- the type to convert to
- All Implemented Interfaces:
Iterable<TO>
,Collection<TO>
,List<TO>
Converts elements of one list to a different type on demand.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe list to transform.Converts elements to the new type.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
source
The list to transform. -
transform
Converts elements to the new type.
-
-
Constructor Details
-
TransformingList
Creates a newTransformingList
.- Parameters:
source
- the list to transformtransform
- transforms elements to the output type
-
-
Method Details
-
get
-
size
public int size()- Specified by:
size
in interfaceCollection<FROM>
- Specified by:
size
in interfaceList<FROM>
- Specified by:
size
in classAbstractCollection<TO>
-