org.omnaest.utils.structure.collection.list
Class ListAbstract.ListAbstractSublist<E>

java.lang.Object
  extended by org.omnaest.utils.structure.collection.CollectionAbstract<E>
      extended by org.omnaest.utils.structure.collection.list.ListAbstract<E>
          extended by org.omnaest.utils.structure.collection.list.ListAbstract.ListAbstractSublist<E>
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Deque<E>, List<E>, Queue<E>
Direct Known Subclasses:
SortedListAbstract.SortedListAbstractSublist
Enclosing class:
ListAbstract<E>

protected static class ListAbstract.ListAbstractSublist<E>
extends ListAbstract<E>

Sublist implementation for the ListAbstract including the fromIndex and excluding the toIndex

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>
 
Field Summary
protected  int fromIndex
           
protected  List<E> parentList
           
protected  int toIndex
           
 
Constructor Summary
ListAbstract.ListAbstractSublist(List<E> parentList, int fromIndex, int toIndex)
           
 
Method Summary
 boolean add(E e)
           
 void add(int index, E element)
           
 E get(int index)
           
 int indexOf(Object o)
           
 int lastIndexOf(Object o)
           
 E remove(int index)
           
 E set(int index, E element)
           
 int size()
           
 List<E> subList(int fromIndex, int toIndex)
           
 
Methods inherited from class org.omnaest.utils.structure.collection.list.ListAbstract
addAll, addFirst, addLast, clear, 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
 
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
 

Field Detail

fromIndex

protected int fromIndex

toIndex

protected int toIndex

parentList

protected List<E> parentList
Constructor Detail

ListAbstract.ListAbstractSublist

public ListAbstract.ListAbstractSublist(List<E> parentList,
                                        int fromIndex,
                                        int toIndex)
Parameters:
parentList -
fromIndex -
toIndex -
See Also:
ListAbstract.ListAbstractSublist
Method Detail

add

public boolean add(E e)

add

public void add(int index,
                E element)

get

public E get(int index)

indexOf

public int indexOf(Object o)

lastIndexOf

public int lastIndexOf(Object o)

remove

public E remove(int index)

set

public E set(int index,
             E element)

size

public int size()

subList

public List<E> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<E>
Overrides:
subList in class ListAbstract<E>


Copyright © 2013. All Rights Reserved.