@CodeReview(reviewer="Jonathan McClain", date="2006-05-17", changesNeeded=false, comments="Looks fine.") public class VectorUnionIterator extends java.lang.Object implements java.util.Iterator<TwoVectorEntry>
Constructor and Description |
---|
VectorUnionIterator(java.util.Iterator<VectorEntry> firstIterator,
java.util.Iterator<VectorEntry> secondIterator,
TwoVectorEntry internalEntry)
Creates a new instance of VectorUnionIterator
|
VectorUnionIterator(Vector first,
Vector second)
Creates a new instance of VectorUnionIterator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
advanceInternalIterators()
Internal method for advancing the internal Iterators
|
VectorEntry |
getFirstInternalEntry()
getter for firstInternalEntry
|
java.util.Iterator<VectorEntry> |
getFirstIterator()
getter for firstIterator
|
TwoVectorEntry |
getInternalEntry()
getter for internalEntry
|
VectorEntry |
getSecondInternalEntry()
getter for secondInternalEntry
|
java.util.Iterator<VectorEntry> |
getSecondIterator()
getter for secondIterator
|
boolean |
hasNext() |
TwoVectorEntry |
next() |
void |
remove() |
boolean |
safeFirstNext()
Try to advance the first entry...
|
boolean |
safeSecondNext()
Try to advance the second entry...
|
void |
setFirstInternalEntry(VectorEntry firstInternalEntry)
setter for firstInternalEntry
|
void |
setFirstIterator(java.util.Iterator<VectorEntry> firstIterator)
setter for firstIterator
|
void |
setInternalEntry(TwoVectorEntry internalEntry)
setter for internalEntry
|
void |
setSecondInternalEntry(VectorEntry secondInternalEntry)
setter for secondInternalEntry
|
void |
setSecondIterator(java.util.Iterator<VectorEntry> secondIterator)
setter for secondIterator
|
public VectorUnionIterator(Vector first, Vector second)
first
- The first Vector.second
- The second Vector.public VectorUnionIterator(java.util.Iterator<VectorEntry> firstIterator, java.util.Iterator<VectorEntry> secondIterator, TwoVectorEntry internalEntry)
firstIterator
- Iterator from the first VectorsecondIterator
- Iterator from the second VectorinternalEntry
- TwoVectorEntry that represents entries from both Vectorsprotected void advanceInternalIterators()
public boolean safeFirstNext()
public boolean safeSecondNext()
public java.util.Iterator<VectorEntry> getFirstIterator()
public void setFirstIterator(java.util.Iterator<VectorEntry> firstIterator)
firstIterator
- Iterator from the first Vectorpublic java.util.Iterator<VectorEntry> getSecondIterator()
public void setSecondIterator(java.util.Iterator<VectorEntry> secondIterator)
secondIterator
- Iterator from the second Vectorpublic TwoVectorEntry getInternalEntry()
public void setInternalEntry(TwoVectorEntry internalEntry)
internalEntry
- TwoVectorEntry that represents entries from both Vectorspublic VectorEntry getFirstInternalEntry()
public void setFirstInternalEntry(VectorEntry firstInternalEntry)
firstInternalEntry
- VectorEntry from the first Vectorpublic VectorEntry getSecondInternalEntry()
public void setSecondInternalEntry(VectorEntry secondInternalEntry)
secondInternalEntry
- VectorEntry from the second Vectorpublic boolean hasNext()
hasNext
in interface java.util.Iterator<TwoVectorEntry>
public TwoVectorEntry next()
next
in interface java.util.Iterator<TwoVectorEntry>
public void remove()
remove
in interface java.util.Iterator<TwoVectorEntry>