org.omnaest.utils.structure.collection.list.adapter
Class ListToListAdapter<FROM,TO>

java.lang.Object
  extended by org.omnaest.utils.structure.collection.CollectionAbstract<E>
      extended by org.omnaest.utils.structure.collection.list.ListAbstract<TO>
          extended by org.omnaest.utils.structure.collection.list.adapter.ListToListAdapter<FROM,TO>
Type Parameters:
FROM -
TO -
All Implemented Interfaces:
Serializable, Iterable<TO>, Collection<TO>, Deque<TO>, List<TO>, Queue<TO>

public class ListToListAdapter<FROM,TO>
extends ListAbstract<TO>

Adapter which allows a given List with a specific type to be used as a List with another specific type using a ElementBidirectionalConverter

Author:
Omnaest
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.omnaest.utils.structure.collection.list.ListAbstract
ListAbstract.ListAbstractSublist<E>
 
Constructor Summary
ListToListAdapter(List<FROM> list, ElementBidirectionalConverter<FROM,TO> elementBidirectionalConverter)
           
 
Method Summary
 void add(int index, TO element)
           
 boolean add(TO e)
           
 void clear()
           
 TO get(int index)
           
 int indexOf(Object o)
           
 int lastIndexOf(Object o)
           
 TO remove(int index)
           
 TO set(int index, TO element)
           
 int size()
           
 
Methods inherited from class org.omnaest.utils.structure.collection.list.ListAbstract
addAll, addFirst, addLast, contains, descendingIterator, element, getFirst, getLast, isValidIndex, iterator, listIterator, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, subList
 
Methods inherited from class org.omnaest.utils.structure.collection.CollectionAbstract
addAll, containsAll, equals, hashCode, isEmpty, 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.List
addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ListToListAdapter

public ListToListAdapter(List<FROM> list,
                         ElementBidirectionalConverter<FROM,TO> elementBidirectionalConverter)
Parameters:
list -
elementBidirectionalConverter -
See Also:
ListToListAdapter
Method Detail

size

public int size()

add

public boolean add(TO e)

get

public TO get(int index)

set

public TO set(int index,
              TO element)

add

public void add(int index,
                TO element)

remove

public TO remove(int index)

indexOf

public int indexOf(Object o)

lastIndexOf

public int lastIndexOf(Object o)

clear

public void clear()
Specified by:
clear in interface Collection<TO>
Specified by:
clear in interface List<TO>
Overrides:
clear in class ListAbstract<TO>


Copyright © 2013. All Rights Reserved.