org.omnaest.utils.structure.table.concrete.internal.iterator
Class TableRowListIterator.TableToListIteratorIndexBasedSourceAdapter<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.internal.iterator.TableRowListIterator.TableToListIteratorIndexBasedSourceAdapter<E>
Type Parameters:
E -
All Implemented Interfaces:
ListIteratorIndexBased.ListIteratorIndexBasedSource<Table.Row<E>>
Enclosing class:
TableRowListIterator<E>

protected static class TableRowListIterator.TableToListIteratorIndexBasedSourceAdapter<E>
extends Object
implements ListIteratorIndexBased.ListIteratorIndexBasedSource<Table.Row<E>>

Adapter for a Table to act as a ListIteratorIndexBased.ListIteratorIndexBasedSource

Author:
Omnaest
See Also:
TableRowListIterator

Field Summary
protected  Table<E> table
           
 
Constructor Summary
TableRowListIterator.TableToListIteratorIndexBasedSourceAdapter(Table<E> table)
           
 
Method Summary
 void add(int indexPosition, Table.Row<E> row)
          Adds a new element at the given index position moving the old element on that position and all following elements one position further.
 Table.Row<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, Table.Row<E> row)
          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

table

protected Table<E> table
Constructor Detail

TableRowListIterator.TableToListIteratorIndexBasedSourceAdapter

public TableRowListIterator.TableToListIteratorIndexBasedSourceAdapter(Table<E> table)
Parameters:
table -
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<Table.Row<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<Table.Row<E>>

get

public Table.Row<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<Table.Row<E>>
Returns:

set

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

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

add

public void add(int indexPosition,
                Table.Row<E> row)
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<Table.Row<E>>


Copyright © 2011. All Rights Reserved.