|
@@ -37,7 +37,7 @@ namespace Framework
|
|
|
{
|
|
|
private:
|
|
|
int bucketIndex;
|
|
|
- Iterator<MapEntry<K, V>> iterator;
|
|
|
+ ArrayIterator<MapEntry<K, V>> iterator;
|
|
|
Array<MapEntry<K, V>>** buckets;
|
|
|
int bucketCount;
|
|
|
|
|
@@ -45,7 +45,7 @@ namespace Framework
|
|
|
MapIterator(Array<MapEntry<K, V>>** buckets,
|
|
|
int bucketCount,
|
|
|
int bucketIndex,
|
|
|
- Iterator<MapEntry<K, V>> iterator)
|
|
|
+ ArrayIterator<MapEntry<K, V>> iterator)
|
|
|
: iterator(iterator)
|
|
|
{
|
|
|
while (bucketIndex < bucketCount
|
|
@@ -53,7 +53,7 @@ namespace Framework
|
|
|
|| buckets[bucketIndex]->getEintragAnzahl() == 0))
|
|
|
{
|
|
|
bucketIndex++;
|
|
|
- iterator = Iterator<MapEntry<K, V>>(0, 0);
|
|
|
+ iterator = ArrayIterator<MapEntry<K, V>>(0, 0);
|
|
|
}
|
|
|
if (bucketIndex < bucketCount)
|
|
|
{
|
|
@@ -61,7 +61,7 @@ namespace Framework
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- this->iterator = Iterator<MapEntry<K, V>>(0, 0);
|
|
|
+ this->iterator = ArrayIterator<MapEntry<K, V>>(0, 0);
|
|
|
this->bucketIndex = 0;
|
|
|
this->buckets = 0;
|
|
|
this->bucketCount = 0;
|
|
@@ -116,7 +116,7 @@ namespace Framework
|
|
|
return MapIterator(buckets,
|
|
|
bucketCount,
|
|
|
bucketIndex + 1,
|
|
|
- Iterator<MapEntry<K, V>>(0, 0));
|
|
|
+ ArrayIterator<MapEntry<K, V>>(0, 0));
|
|
|
}
|
|
|
|
|
|
operator bool()
|
|
@@ -151,7 +151,7 @@ namespace Framework
|
|
|
this->iterator = buckets[bucketIndex]->begin();
|
|
|
else
|
|
|
{
|
|
|
- this->iterator = Iterator<MapEntry<K, V>>(0, 0);
|
|
|
+ this->iterator = ArrayIterator<MapEntry<K, V>>(0, 0);
|
|
|
this->bucketIndex = 0;
|
|
|
this->buckets = 0;
|
|
|
this->bucketCount = 0;
|
|
@@ -324,12 +324,13 @@ namespace Framework
|
|
|
MapIterator<K, V> begin()
|
|
|
{
|
|
|
return MapIterator<K, V>(
|
|
|
- buckets, bucketCount, 0, Iterator<MapEntry<K, V>>(0, 0));
|
|
|
+ buckets, bucketCount, 0, ArrayIterator<MapEntry<K, V>>(0, 0));
|
|
|
}
|
|
|
|
|
|
MapIterator<K, V> end()
|
|
|
{
|
|
|
- return MapIterator<K, V>(0, 0, 0, Iterator<MapEntry<K, V>>(0, 0));
|
|
|
+ return MapIterator<K, V>(
|
|
|
+ 0, 0, 0, ArrayIterator<MapEntry<K, V>>(0, 0));
|
|
|
}
|
|
|
};
|
|
|
} // namespace Framework
|