@Override public KeysIterator create() { return new KeysIterator(); }
/** * Iterate backwards w.r.t the buffer, to * minimize collision chains when filling another hash container (ex. with putAll()) */ @Override protected ByteCursor fetch() { if (this.cursor.index == ByteDoubleHashMap.this.keys.length + 1) { if (ByteDoubleHashMap.this.allocatedDefaultKey) { this.cursor.index = ByteDoubleHashMap.this.keys.length; this.cursor.value = ((byte)0); return this.cursor; } //no value associated with the default key, continue iteration... this.cursor.index = ByteDoubleHashMap.this.keys.length; } int i = this.cursor.index - 1; while (i >= 0 && !(!(((((ByteDoubleHashMap.this.keys)))[(i)]) == (byte)0))) { i--; } if (i == -1) { return done(); } this.cursor.index = i; this.cursor.value = ((ByteDoubleHashMap.this.keys[i])); return this.cursor; } }