Package generic.stl
Class UnmodifiableListIteratorSTL<T>
java.lang.Object
generic.stl.ListIterator<T>
generic.stl.UnmodifiableListIteratorSTL<T>
- All Implemented Interfaces:
IteratorSTL<T>
This wrapper class is used to detect cases where code is
modifying iterators that shouldn't change.
-
Field Summary
Fields inherited from class generic.stl.ListIterator
node, stackUse -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(IteratorSTL<T> otherIterator) 'Assigns' this iterator to be equivalent to the given iterator.Devance the iterator to the previous position.decrement(int n) Devances the iterator n positions.voiddelete()voiddelete(int count) Advances the iterator to the next position.increment(int n) Advances the iterator n positions.voidInserts the given value at the current position (the current value will be pushed to the next value).voidSets the current value of the iterator to the given value.
-
Constructor Details
-
UnmodifiableListIteratorSTL
-
-
Method Details
-
assign
Description copied from interface:IteratorSTL'Assigns' this iterator to be equivalent to the given iterator. This is equivalent to C++'s '=' overloading mechanism- Specified by:
assignin interfaceIteratorSTL<T>- Overrides:
assignin classListIterator<T>- Parameters:
otherIterator- The iterator to copy
-
decrement
Description copied from interface:IteratorSTLDevance the iterator to the previous position. This method is only supported in bidirectional iterators.- Specified by:
decrementin interfaceIteratorSTL<T>- Overrides:
decrementin classListIterator<T>- Returns:
- a reference to the iterator itself
-
decrement
Description copied from interface:IteratorSTLDevances the iterator n positions.- Specified by:
decrementin interfaceIteratorSTL<T>- Overrides:
decrementin classListIterator<T>- Returns:
- a reference to the iterator itself
-
delete
public void delete() -
delete
public void delete(int count) -
increment
Description copied from interface:IteratorSTLAdvances the iterator to the next position.- Specified by:
incrementin interfaceIteratorSTL<T>- Overrides:
incrementin classListIterator<T>- Returns:
- a reference to the iterator itself
-
increment
Description copied from interface:IteratorSTLAdvances the iterator n positions.- Specified by:
incrementin interfaceIteratorSTL<T>- Overrides:
incrementin classListIterator<T>- Returns:
- a reference to the iterator itself
-
insert
Description copied from interface:IteratorSTLInserts the given value at the current position (the current value will be pushed to the next value). The iterator will be positioned on the new value.- Specified by:
insertin interfaceIteratorSTL<T>- Overrides:
insertin classListIterator<T>- Parameters:
value- the value to insert into the collection.
-
set
Description copied from interface:IteratorSTLSets the current value of the iterator to the given value.- Specified by:
setin interfaceIteratorSTL<T>- Overrides:
setin classListIterator<T>- Parameters:
value- the value to set at the iterator position
-