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

java.lang.Object
  extended by net.ranides.assira.collection.list.EmptyListIterator<T>
Type Parameters:
T -
All Implemented Interfaces:
Iterator<T>, ListIterator<T>

public final class EmptyListIterator<T>
extends Object
implements ListIterator<T>

Implementacja iteratora reprezentującego pusty zbiór, którego nie można modyfikować.

Author:
ranides

Field Summary
static ListIterator INSTANCE
           
 
Constructor Summary
EmptyListIterator()
           
 
Method Summary
 void add(T value)
           
static
<TT> ListIterator<TT>
emptyIterator()
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 T next()
           
 int nextIndex()
           
 T previous()
           
 int previousIndex()
           
 void remove()
           
 void set(T value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ListIterator INSTANCE
Constructor Detail

EmptyListIterator

public EmptyListIterator()
Method Detail

emptyIterator

public static <TT> ListIterator<TT> emptyIterator()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>
Specified by:
hasNext in interface ListIterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>
Specified by:
next in interface ListIterator<T>

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface ListIterator<T>

previous

public T previous()
Specified by:
previous in interface ListIterator<T>

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface ListIterator<T>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface ListIterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>
Specified by:
remove in interface ListIterator<T>

set

public void set(T value)
Specified by:
set in interface ListIterator<T>

add

public void add(T value)
Specified by:
add in interface ListIterator<T>


Copyright © 2013. All Rights Reserved.