Package generic.stl

# Class UnmodifiableListIteratorSTL<T>

java.lang.Object
generic.stl.ListIterator<T>
generic.stl.UnmodifiableListIteratorSTL<T>

All Implemented Interfaces:
  `IteratorSTL<T>`

public class UnmodifiableListIteratorSTL<T> extends ListIterator<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
  Constructor
  Description
  `UnmodifiableListIteratorSTL(ListIterator<T> iterator)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `assign(IteratorSTL<T> otherIterator)`
  'Assigns' this iterator to be equivalent to the given iterator.
  `IteratorSTL<T>`
  `decrement()`
  Devance the iterator to the previous position.
  `IteratorSTL<T>`
  `decrement(int n)`
  Devances the iterator n positions.
  `void`
  `delete()`
  `void`
  `delete(int count)`
  `IteratorSTL<T>`
  `increment()`
  Advances the iterator to the next position.
  `IteratorSTL<T>`
  `increment(int n)`
  Advances the iterator n positions.
  `void`
  `insert(T value)`
  Inserts the given value at the current position (the current value will be pushed to the next value).
  `void`
  `set(Object value)`
  Sets the current value of the iterator to the given value.

  ### Methods inherited from class generic.stl.ListIterator

  `copy, equals, get, getNode, hashCode, isBegin, isEnd`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UnmodifiableListIteratorSTL

    public UnmodifiableListIteratorSTL(ListIterator<T> iterator)

- ## Method Details

  - ### assign

    public void assign(IteratorSTL<T> otherIterator)
    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:
      `assign` in interface `IteratorSTL<T>`
    Overrides:
      `assign` in class `ListIterator<T>`
    Parameters:
      `otherIterator` - The iterator to copy

  - ### decrement

    public IteratorSTL<T> decrement()
    Description copied from interface: `IteratorSTL`
    Devance the iterator to the previous position. This method is only supported in bidirectional iterators.
    Specified by:
      `decrement` in interface `IteratorSTL<T>`
    Overrides:
      `decrement` in class `ListIterator<T>`
    Returns:
      a reference to the iterator itself

  - ### decrement

    public IteratorSTL<T> decrement(int n)
    Description copied from interface: `IteratorSTL`
    Devances the iterator n positions.
    Specified by:
      `decrement` in interface `IteratorSTL<T>`
    Overrides:
      `decrement` in class `ListIterator<T>`
    Returns:
      a reference to the iterator itself

  - ### delete

    public void delete()

  - ### delete

    public void delete(int count)

  - ### increment

    public IteratorSTL<T> increment()
    Description copied from interface: `IteratorSTL`
    Advances the iterator to the next position.
    Specified by:
      `increment` in interface `IteratorSTL<T>`
    Overrides:
      `increment` in class `ListIterator<T>`
    Returns:
      a reference to the iterator itself

  - ### increment

    public IteratorSTL<T> increment(int n)
    Description copied from interface: `IteratorSTL`
    Advances the iterator n positions.
    Specified by:
      `increment` in interface `IteratorSTL<T>`
    Overrides:
      `increment` in class `ListIterator<T>`
    Returns:
      a reference to the iterator itself

  - ### insert

    public void insert(T value)
    Description copied from interface: `IteratorSTL`
    Inserts 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:
      `insert` in interface `IteratorSTL<T>`
    Overrides:
      `insert` in class `ListIterator<T>`
    Parameters:
      `value` - the value to insert into the collection.

  - ### set

    public void set(Object value)
    Description copied from interface: `IteratorSTL`
    Sets the current value of the iterator to the given value.
    Specified by:
      `set` in interface `IteratorSTL<T>`
    Overrides:
      `set` in class `ListIterator<T>`
    Parameters:
      `value` - the value to set at the iterator position