Class TransformedList
- java.lang.Object
-
- org.apache.commons.collections.collection.AbstractCollectionDecorator
-
- org.apache.commons.collections.collection.AbstractSerializableCollectionDecorator
-
- org.apache.commons.collections.collection.TransformedCollection
-
- org.apache.commons.collections.list.TransformedList
-
- All Implemented Interfaces:
Serializable,Iterable,Collection,List
@Deprecated(since="2021-04-30") public class TransformedList extends TransformedCollection implements List
Deprecated.Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.Decorates anotherListto transform objects that are added.The add and set methods are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects.
This class is Serializable from Commons Collections 3.1.
- Since:
- Commons Collections 3.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(int index, Object object)Deprecated.booleanaddAll(int index, Collection coll)Deprecated.static Listdecorate(List list, Transformer transformer)Deprecated.Factory method to create a transforming list.Objectget(int index)Deprecated.intindexOf(Object object)Deprecated.intlastIndexOf(Object object)Deprecated.ListIteratorlistIterator()Deprecated.ListIteratorlistIterator(int i)Deprecated.Objectremove(int index)Deprecated.Objectset(int index, Object object)Deprecated.ListsubList(int fromIndex, int toIndex)Deprecated.-
Methods inherited from class org.apache.commons.collections.collection.TransformedCollection
add, addAll, decorate
-
Methods inherited from class org.apache.commons.collections.collection.AbstractCollectionDecorator
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
decorate
public static List decorate(List list, Transformer transformer)
Deprecated.Factory method to create a transforming list.If there are any elements already in the list being decorated, they are NOT transformed.
- Parameters:
list- the list to decorate, must not be nulltransformer- the transformer to use for conversion, must not be null- Throws:
IllegalArgumentException- if list or transformer is null
-
lastIndexOf
public int lastIndexOf(Object object)
Deprecated.- Specified by:
lastIndexOfin interfaceList
-
addAll
public boolean addAll(int index, Collection coll)Deprecated.
-
listIterator
public ListIterator listIterator()
Deprecated.- Specified by:
listIteratorin interfaceList
-
listIterator
public ListIterator listIterator(int i)
Deprecated.- Specified by:
listIteratorin interfaceList
-
-