T - The type of objects to iterate.TContainer - The type of container that contains
the elements inserted before the specified position.TIterator - The type of iterator that specifies
the inserting position.public class InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>> extends java.lang.Object implements IOutIter<T,InsertIter<T,TContainer,TIterator>>
| Constructor and Description |
|---|
InsertIter(InsertIter<T,TContainer,TIterator> x)
Constructs a new instance from another iterator.
|
InsertIter(TContainer cnt,
TIterator iter)
Constructs an InsertIter that inserts elements
in a container before a specified iterator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Advance(int offset)
Used to implement the Advance method.
|
void |
Advance(long offset)
Used to implement the Advance method.
|
IteratorCategory |
Category()
Gets the iterator category.
|
InsertIter<T,TContainer,TIterator> |
Copy()
Creates and returns a copy of the current instance.
|
void |
Dispose()
Performs application-defined tasks associated with freeing, releasing,
or resetting system resources or other cleanup.
|
long |
Distance(InsertIter<T,TContainer,TIterator> other)
Used to implement the Distance method.
|
boolean |
Equals(InsertIter<T,TContainer,TIterator> other)
Tests whether this instance is equal to a specified object.
|
boolean |
equals(java.lang.Object obj)
Tests whether this instance is equal to a specified
object.
|
int |
hashCode()
Returns the hash code for this instance.
|
void |
Increment()
Used to implement the IOutIter Increment method.
|
InsertIter<T,TContainer,TIterator> |
Next()
Used to implement the IOutIter Next method.
|
void |
ResetBegin()
Used to implement the IOutIter ResetBegin method.
|
void |
ResetEnd()
Used to implement the IOutIter ResetEnd method.
|
void |
SetCurrent(T value)
Inserts an element at the current iterator.
|
public InsertIter(TContainer cnt, TIterator iter)
cnt - The container into which the InsertIter
is to insert elements.iter - The position for the insertion.java.lang.NullPointerException - When the container is null.public InsertIter(InsertIter<T,TContainer,TIterator> x)
x - The iterator to copy.public void Dispose()
Dispose in interface IDisposablepublic IteratorCategory Category()
Category in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>public InsertIter<T,TContainer,TIterator> Copy()
Copy in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>public void SetCurrent(T value)
SetCurrent in interface IOutIter<T,InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>value - The specified element to be inserted.public void ResetBegin()
ResetBegin in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>public void ResetEnd()
ResetEnd in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>public void Increment()
Increment in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>public InsertIter<T,TContainer,TIterator> Next()
public void Advance(int offset)
Advance in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>offset - The number of positions the iterator is to be offset.public void Advance(long offset)
Advance in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>offset - The number of positions the iterator is to be offset.public long Distance(InsertIter<T,TContainer,TIterator> other)
Distance in interface IBaseIter<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>other - An input iterator addressing the position
one past the final element in the range [this, other).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - An object to compare with this instance.public int hashCode()
hashCode in class java.lang.Objectpublic boolean Equals(InsertIter<T,TContainer,TIterator> other)
Equals in interface IEquatable<InsertIter<T,TContainer extends IInsertSequence<T,TIterator>,TIterator extends IOutIter<T,TIterator>>>other - An object to compare with this instance.Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.