All Packages Class Hierarchy This Package Previous Next Index
Class COM.objectspace.jgl.IntIterator
java.lang.Object
|
+----COM.objectspace.jgl.IntIterator
- public final class IntIterator
- extends Object
- implements RandomAccessIterator, Serializable
An IntIterator is a random access iterator that allows you to iterate through
an array of ints.
- See Also:
- RandomAccessIterator
-
IntIterator()
- Construct myself to be an iterator with no associated data structure or position.
-
IntIterator(int[])
- Construct myself to be an iterator positioned at the first element of a specified
array.
-
IntIterator(int[], int)
- Construct myself to be positioned at a particular index of a specific int[].
-
IntIterator(int[], int, IntArray)
- Construct myself to be positioned at a particular index of a specific int[].
-
IntIterator(int[], IntArray)
- Construct myself to be an iterator positioned at the first element of a specified
array.
-
IntIterator(IntIterator)
- Construct myself to be a copy of an existing iterator.
-
advance()
- Advance by one.
-
advance(int)
- Advance by a specified amount.
-
atBegin()
- Return true if I'm positioned at the first item of my input stream.
-
atEnd()
- Return true if I'm positioned after the last item in my input stream.
-
begin(int[])
- Return an iterator positioned at the first element of a particular array.
-
begin(int[], IntArray)
- Return an iterator positioned at the first element of a particular array.
-
clone()
- Return a clone of myself.
-
distance(ForwardIterator)
- Return the distance from myself to another iterator.
-
end(int[])
- Return an iterator positioned immediately after the last element of a particular array.
-
end(int[], IntArray)
- Return an iterator positioned immediately after the last element of a particular array.
-
equals(IntIterator)
- Return true if iterator is positioned at the same element as me.
-
equals(Object)
- Return true if a specified object is the same kind of iterator as me
and is positioned at the same element.
-
get()
- Return the object at my current position.
-
get(int)
- Return the object that is a specified distance from my current position.
-
getContainer()
- Return null for my associated Container since none needs to exist.
-
hasMoreElements()
- Return true if there are more elements in my input stream.
-
index()
- Return my current index.
-
less(RandomAccessIterator)
- Return true if I'm before a specified iterator.
-
nextElement()
- Return the next element in my input stream.
-
put(int, Object)
- Write an object at a specified distance from my current position.
-
put(Object)
- Set the object at my current position to a specified value.
-
retreat()
- Retreat by one.
-
retreat(int)
- Retreat by a specified amount.
IntIterator
public IntIterator()
- Construct myself to be an iterator with no associated data structure or position.
IntIterator
public IntIterator(int array[])
- Construct myself to be an iterator positioned at the first element of a specified
array.
- Parameters:
- array - The array whose first element I will be positioned at.
IntIterator
public IntIterator(int array[],
IntArray intArray)
- Construct myself to be an iterator positioned at the first element of a specified
array.
- Parameters:
- array - The array whose first element I will be positioned at.
- intArray - The array the iterator is associated with.
IntIterator
public IntIterator(IntIterator iterator)
- Construct myself to be a copy of an existing iterator.
- Parameters:
- iterator - The iterator to copy.
IntIterator
public IntIterator(int array[],
int index)
- Construct myself to be positioned at a particular index of a specific int[].
- Parameters:
- array - My associated int[].
- i - My associated index.
IntIterator
public IntIterator(int array[],
int index,
IntArray intArray)
- Construct myself to be positioned at a particular index of a specific int[].
- Parameters:
- array - My associated int[].
- index - My associated index.
- intArray - The array the iterator is associated with.
begin
public static IntIterator begin(int array[])
- Return an iterator positioned at the first element of a particular array.
- Parameters:
- array - The array whose first element I will be positioned at.
begin
public static IntIterator begin(int array[],
IntArray intArray)
- Return an iterator positioned at the first element of a particular array.
- Parameters:
- array - The array whose first element I will be positioned at.
- intArray - The array the iterator is associated with.
end
public static IntIterator end(int array[])
- Return an iterator positioned immediately after the last element of a particular array.
- Parameters:
- array - The array whose last element I will be positioned after.
end
public static IntIterator end(int array[],
IntArray intArray)
- Return an iterator positioned immediately after the last element of a particular array.
- Parameters:
- array - The array whose last element I will be positioned after.
- intArray - The array the iterator is associated with.
index
public int index()
- Return my current index.
clone
public Object clone()
- Return a clone of myself.
- Overrides:
- clone in class Object
equals
public boolean equals(Object object)
- Return true if a specified object is the same kind of iterator as me
and is positioned at the same element.
- Parameters:
- object - Any object.
- Overrides:
- equals in class Object
equals
public boolean equals(IntIterator iterator)
- Return true if iterator is positioned at the same element as me.
- Parameters:
- iterator - The iterator to compare myself against.
less
public boolean less(RandomAccessIterator iterator)
- Return true if I'm before a specified iterator.
- Parameters:
- iterator - The iterator to compare myself against.
get
public Object get(int offset)
- Return the object that is a specified distance from my current position.
- Parameters:
- offset - The offset from my current position.
put
public void put(int offset,
Object object)
- Write an object at a specified distance from my current position.
- Parameters:
- offset - The offset from my current position.
- object - The object to write.
atBegin
public boolean atBegin()
- Return true if I'm positioned at the first item of my input stream.
atEnd
public boolean atEnd()
- Return true if I'm positioned after the last item in my input stream.
hasMoreElements
public boolean hasMoreElements()
- Return true if there are more elements in my input stream.
advance
public void advance()
- Advance by one.
advance
public void advance(int n)
- Advance by a specified amount.
- Parameters:
- n - The amount to advance.
retreat
public void retreat()
- Retreat by one.
retreat
public void retreat(int n)
- Retreat by a specified amount.
- Parameters:
- n - The amount to retreat.
nextElement
public Object nextElement()
- Return the next element in my input stream.
get
public Object get()
- Return the object at my current position.
put
public void put(Object object)
- Set the object at my current position to a specified value.
- Parameters:
- object - The object to be written at my current position.
distance
public int distance(ForwardIterator iterator)
- Return the distance from myself to another iterator.
I should be before the specified iterator.
- Parameters:
- iterator - The iterator to compare myself against.
getContainer
public Container getContainer()
- Return null for my associated Container since none needs to exist.
All Packages Class Hierarchy This Package Previous Next Index