public class SymmetricDifferenceCursor<S> extends AbstractCursor<S>
Both cursors must return results in the same order. Ordering is preserved by the difference.
UnionCursor
,
IntersectionCursor
,
DifferenceCursor
Constructor and Description |
---|
SymmetricDifferenceCursor(Cursor<S> left,
Cursor<S> right,
java.util.Comparator<S> order) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Call close to release any resources being held by this cursor.
|
int |
compareNext()
Returns 0 if no next element available, <0 if next element is
from left source cursor, and >0 if next element is from right
source cursor.
|
boolean |
hasNext()
Returns true if this cursor has more elements.
|
S |
next()
Returns the next element from this cursor.
|
public void close() throws FetchException
Cursor
FetchException
public boolean hasNext() throws FetchException
Cursor
next
would return an element rather than throwing
an exception.FetchException
- if storage layer throws an exceptionpublic int compareNext() throws FetchException
FetchException
public S next() throws FetchException
Cursor
FetchException
- if storage layer throws an exceptionCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.