net.ranides.assira.collection.list
Class JoinList<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<T>
              extended by net.ranides.assira.collection.list.JoinList<T>
Type Parameters:
T -
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>

public class JoinList<T>
extends AbstractSequentialList<T>

Klasa reprezentująca złączenie wielu list jako jedną kolekcję.

Author:
ranides

Constructor Summary
JoinList()
          Tworzy nowe złączenie, do którego można doklejać nowe listy za pomocą metody join(List)
JoinList(List<List<T>> values)
          Tworzy nowe złączenie na podstawie podanej listy list.
 
Method Summary
 boolean contains(Object value)
           
 T get(int index)
           
 Iterator<T> iterator()
           
 void join(List<T> list)
          Dodaje do złączenia listę.
 ListIterator<T> listIterator()
           
 ListIterator<T> listIterator(int index)
           
 int size()
           
 
Methods inherited from class java.util.AbstractSequentialList
add, addAll, remove, set
 
Methods inherited from class java.util.AbstractList
add, clear, equals, hashCode, indexOf, lastIndexOf, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

JoinList

public JoinList()
Tworzy nowe złączenie, do którego można doklejać nowe listy za pomocą metody join(List)


JoinList

public JoinList(List<List<T>> values)
Tworzy nowe złączenie na podstawie podanej listy list.

Parameters:
values -
Method Detail

size

public int size()
Specified by:
size in interface Collection<T>
Specified by:
size in interface List<T>
Specified by:
size in class AbstractCollection<T>

contains

public boolean contains(Object value)
Specified by:
contains in interface Collection<T>
Specified by:
contains in interface List<T>
Overrides:
contains in class AbstractCollection<T>

get

public T get(int index)
Specified by:
get in interface List<T>
Overrides:
get in class AbstractSequentialList<T>

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>
Specified by:
iterator in interface Collection<T>
Specified by:
iterator in interface List<T>
Overrides:
iterator in class AbstractSequentialList<T>

listIterator

public ListIterator<T> listIterator()
Specified by:
listIterator in interface List<T>
Overrides:
listIterator in class AbstractList<T>

listIterator

public ListIterator<T> listIterator(int index)
Specified by:
listIterator in interface List<T>
Specified by:
listIterator in class AbstractSequentialList<T>

join

public void join(List<T> list)
Dodaje do złączenia listę.

Parameters:
list -


Copyright © 2013. All Rights Reserved.