org.omnaest.utils.structure.iterator
Class ListIteratorIndexBased.ListToListIteratorSourceAdapter<E>

java.lang.Object
  extended by org.omnaest.utils.structure.iterator.ListIteratorIndexBased.ListToListIteratorSourceAdapter<E>
Type Parameters:
E -
All Implemented Interfaces:
ListIteratorIndexBased.ListIteratorIndexBasedSource<E>
Enclosing class:
ListIteratorIndexBased<E>

public static class ListIteratorIndexBased.ListToListIteratorSourceAdapter<E>
extends Object
implements ListIteratorIndexBased.ListIteratorIndexBasedSource<E>

Adapter for any List implementation to act as a ListIteratorIndexBased.ListIteratorIndexBasedSource

Author:
Omnaest

Field Summary
protected  List<E> list
           
 
Constructor Summary
ListIteratorIndexBased.ListToListIteratorSourceAdapter(List<E> list)
           
 
Method Summary
 void add(int indexPosition, E element)
          Adds a new element at the given index position moving the old element on that position and all following elements one position further.
 E get(int indexPosition)
          Returns the element at the given index position
 void remove(int indexPosition)
          Removes the element at the given index position
 void set(int indexPosition, E element)
          Sets the element at the given index position
 int size()
          Returns the size of the underlying structure which is the highest index position added by one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

protected List<E> list
Constructor Detail

ListIteratorIndexBased.ListToListIteratorSourceAdapter

public ListIteratorIndexBased.ListToListIteratorSourceAdapter(List<E> list)
Parameters:
list -
Method Detail

size

public int size()
Description copied from interface: ListIteratorIndexBased.ListIteratorIndexBasedSource
Returns the size of the underlying structure which is the highest index position added by one

Specified by:
size in interface ListIteratorIndexBased.ListIteratorIndexBasedSource<E>
Returns:

get

public E get(int indexPosition)
Description copied from interface: ListIteratorIndexBased.ListIteratorIndexBasedSource
Returns the element at the given index position

Specified by:
get in interface ListIteratorIndexBased.ListIteratorIndexBasedSource<E>
Returns:

remove

public void remove(int indexPosition)
Description copied from interface: ListIteratorIndexBased.ListIteratorIndexBasedSource
Removes the element at the given index position

Specified by:
remove in interface ListIteratorIndexBased.ListIteratorIndexBasedSource<E>

set

public void set(int indexPosition,
                E element)
Description copied from interface: ListIteratorIndexBased.ListIteratorIndexBasedSource
Sets the element at the given index position

Specified by:
set in interface ListIteratorIndexBased.ListIteratorIndexBasedSource<E>

add

public void add(int indexPosition,
                E element)
Description copied from interface: ListIteratorIndexBased.ListIteratorIndexBasedSource
Adds a new element at the given index position moving the old element on that position and all following elements one position further.

Specified by:
add in interface ListIteratorIndexBased.ListIteratorIndexBasedSource<E>


Copyright © 2013. All Rights Reserved.