org.gridkit.jvmtool.event
Class ExcludeIterator<T>
java.lang.Object
org.gridkit.jvmtool.event.ExcludeIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public class ExcludeIterator<T>
- extends Object
- implements Iterator<T>
Subtract one Iterator from another.
Each of nested Iterators MUST produce ordered, duplicate free
sequence of values.
Result would be ordered, duplicate free sequence of values present
in iterator A, but not present in V.
- Author:
- Alexey Ragozin (alexey.ragozin@gmail.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExcludeIterator
public ExcludeIterator(Iterator<T> a,
Iterator<T> b,
Comparator<T> cmp)
exclude
public static <T> Iterator<T> exclude(Iterator<T> a,
Iterator<T> b)
exclude
public static <T> Iterator<T> exclude(Iterator<T> a,
Iterator<T> b,
Comparator<T> cmp)
exclude
public static <T> Iterable<T> exclude(Iterable<T> a,
Iterable<T> b)
exclude
public static <T> Iterable<T> exclude(Iterable<T> a,
Iterable<T> b,
Comparator<T> cmp)
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<T>
next
public T next()
- Specified by:
next in interface Iterator<T>
remove
public void remove()
- Specified by:
remove in interface Iterator<T>
Copyright © 2019. All Rights Reserved.