Package generic.stl
Class ReverseMapIteratorSTL<K,V>
- java.lang.Object
-
- generic.stl.MapIteratorSTL<K,V>
-
- generic.stl.ReverseMapIteratorSTL<K,V>
-
- All Implemented Interfaces:
IteratorSTL<Pair<K,V>>
public class ReverseMapIteratorSTL<K,V> extends MapIteratorSTL<K,V>
-
-
Field Summary
-
Fields inherited from class generic.stl.MapIteratorSTL
erased, node, tree
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IteratorSTL<Pair<K,V>>
copy()
Creates a copy of this iterator.IteratorSTL<Pair<K,V>>
decrement()
Devance the iterator to the previous position.void
delete()
void
delete(int count)
boolean
equals(java.lang.Object obj)
IteratorSTL<Pair<K,V>>
increment()
Advances the iterator to the next position.void
insert(Pair<K,V> value)
Inserts the given value at the current position (the current value will be pushed to the next value).boolean
isBegin()
Returns true if the iterator is positioned on the first first element of the collection.
-
-
-
Method Detail
-
increment
public IteratorSTL<Pair<K,V>> increment()
Description copied from interface:IteratorSTL
Advances the iterator to the next position.- Specified by:
increment
in interfaceIteratorSTL<K>
- Overrides:
increment
in classMapIteratorSTL<K,V>
- Returns:
- a reference to the iterator itself
-
decrement
public IteratorSTL<Pair<K,V>> 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 interfaceIteratorSTL<K>
- Overrides:
decrement
in classMapIteratorSTL<K,V>
- Returns:
- a reference to the iterator itself
-
delete
public void delete()
-
delete
public void delete(int count)
-
insert
public void insert(Pair<K,V> 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 interfaceIteratorSTL<K>
- Overrides:
insert
in classMapIteratorSTL<K,V>
- Parameters:
value
- the value to insert into the collection.
-
isBegin
public boolean isBegin()
Description copied from interface:IteratorSTL
Returns true if the iterator is positioned on the first first element of the collection. If the collection is empty, this will always return false.- Specified by:
isBegin
in interfaceIteratorSTL<K>
- Overrides:
isBegin
in classMapIteratorSTL<K,V>
- Returns:
- true if the iterator is positioned on the first element of the collection.
-
copy
public IteratorSTL<Pair<K,V>> copy()
Description copied from interface:IteratorSTL
Creates a copy of this iterator.- Specified by:
copy
in interfaceIteratorSTL<K>
- Overrides:
copy
in classMapIteratorSTL<K,V>
- Returns:
- a copy of this iterator.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classMapIteratorSTL<K,V>
-
-