Package org.eclipse.m2m.atl.emftvm.util
Class LazyList.UnionListIterator
- java.lang.Object
-
- org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator<E>
-
- org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyListIterator<E>
-
- org.eclipse.m2m.atl.emftvm.util.LazyCollection.WrappedListIterator
-
- org.eclipse.m2m.atl.emftvm.util.LazyList.UnionListIterator
-
- All Implemented Interfaces:
java.util.Iterator<E>
,java.util.ListIterator<E>
public class LazyList.UnionListIterator extends LazyCollection.WrappedListIterator
ListIterator
that returns first the elements of the underlying collection, then the elements of the other collection.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ListIterator<? extends E>
added
protected boolean
addedPrev
protected boolean
innerNext
protected java.util.List<? extends E>
s
-
Fields inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.WrappedListIterator
inner
-
-
Constructor Summary
Constructors Constructor Description UnionListIterator(java.util.List<? extends E> s)
Creates a newLazyList.UnionListIterator
for the underlying collection ands
.UnionListIterator(java.util.List<? extends E> s, int index)
Creates a newLazyList.UnionListIterator
for the underlying collection ands
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
boolean
hasPrevious()
E
next()
int
nextIndex()
E
previous()
int
previousIndex()
-
Methods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyListIterator
add, set
-
Methods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator
remove
-
-
-
-
Constructor Detail
-
UnionListIterator
public UnionListIterator(java.util.List<? extends E> s)
Creates a newLazyList.UnionListIterator
for the underlying collection ands
.- Parameters:
s
- the collection to union
-
UnionListIterator
public UnionListIterator(java.util.List<? extends E> s, int index)
Creates a newLazyList.UnionListIterator
for the underlying collection ands
.- Parameters:
s
- the collection to unionindex
- the iterator starting index.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<E>
- Specified by:
hasNext
in interfacejava.util.ListIterator<E>
- Overrides:
hasNext
in classLazyCollection.WrappedListIterator
-
next
public E next()
- Specified by:
next
in interfacejava.util.Iterator<E>
- Specified by:
next
in interfacejava.util.ListIterator<E>
- Overrides:
next
in classLazyCollection.WrappedListIterator
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfacejava.util.ListIterator<E>
- Overrides:
nextIndex
in classLazyCollection.WrappedListIterator
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interfacejava.util.ListIterator<E>
- Overrides:
hasPrevious
in classLazyCollection.WrappedListIterator
-
previous
public E previous()
- Specified by:
previous
in interfacejava.util.ListIterator<E>
- Overrides:
previous
in classLazyCollection.WrappedListIterator
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfacejava.util.ListIterator<E>
- Overrides:
previousIndex
in classLazyCollection.WrappedListIterator
-
-