/** * Iterate over a number of keys. * * @param from the first key to return * @return the iterator */ public Iterator<K> keyIterator(K from) { return new Cursor<K, V>(this, root, from); }
/** * Get a cursor to iterate over a number of keys and values. * * @param from the first key to return * @return the cursor */ public Cursor<K, V> cursor(K from) { return new Cursor<>(this, root, from); }
@Override public Iterator<K> iterator() { return new Cursor<K, V>(map, root, null); }
@Override public Iterator<Entry<K, V>> iterator() { final Cursor<K, V> cursor = new Cursor<>(map, root, null); return new Iterator<Entry<K, V>>() { @Override public boolean hasNext() { return cursor.hasNext(); } @Override public Entry<K, V> next() { K k = cursor.next(); return new DataUtils.MapEntry<>(k, cursor.getValue()); } @Override public void remove() { throw DataUtils.newUnsupportedOperationException( "Removing is not supported"); } }; }
/** * Iterate over a number of keys. * * @param from the first key to return * @return the iterator */ public Iterator<K> keyIterator(K from) { return new Cursor<K, V>(this, root, from); }
/** * Iterate over a number of keys. * * @param from the first key to return * @return the iterator */ public Iterator<K> keyIterator(K from) { return new Cursor<K, V>(this, root, from); }
/** * Get a cursor to iterate over a number of keys and values. * * @param from the first key to return * @return the cursor */ public Cursor<K, V> cursor(K from) { return new Cursor<>(this, root, from); }
/** * Iterate over a number of keys. * * @param from the first key to return * @return the iterator */ public Iterator<K> keyIterator(K from) { return new Cursor<K, V>(this, root, from); }
/** * Get a cursor to iterate over a number of keys and values. * * @param from the first key to return * @return the cursor */ public Cursor<K, V> cursor(K from) { return new Cursor<K, V>(this, root, from); }
@Override public Iterator<K> iterator() { return new Cursor<K, V>(map, root, null); }
@Override public Iterator<K> iterator() { return new Cursor<K, V>(map, root, null); }
/** * Get a cursor to iterate over a number of keys and values. * * @param from the first key to return * @return the cursor */ public Cursor<K, V> cursor(K from) { return new Cursor<K, V>(this, root, from); }
@Override public Iterator<K> iterator() { return new Cursor<K, V>(map, root, null); }
@Override public Iterator<Entry<K, V>> iterator() { final Cursor<K, V> cursor = new Cursor<>(map, root, null); return new Iterator<Entry<K, V>>() { @Override public boolean hasNext() { return cursor.hasNext(); } @Override public Entry<K, V> next() { K k = cursor.next(); return new DataUtils.MapEntry<>(k, cursor.getValue()); } @Override public void remove() { throw DataUtils.newUnsupportedOperationException( "Removing is not supported"); } }; }
@Override public Iterator<Entry<K, V>> iterator() { final Cursor<K, V> cursor = new Cursor<K, V>(map, root, null); return new Iterator<Entry<K, V>>() { @Override public boolean hasNext() { return cursor.hasNext(); } @Override public Entry<K, V> next() { K k = cursor.next(); return new DataUtils.MapEntry<K, V>(k, cursor.getValue()); } @Override public void remove() { throw DataUtils.newUnsupportedOperationException( "Removing is not supported"); } }; }
@Override public Iterator<Entry<K, V>> iterator() { final Cursor<K, V> cursor = new Cursor<K, V>(map, root, null); return new Iterator<Entry<K, V>>() { @Override public boolean hasNext() { return cursor.hasNext(); } @Override public Entry<K, V> next() { K k = cursor.next(); return new DataUtils.MapEntry<K, V>(k, cursor.getValue()); } @Override public void remove() { throw DataUtils.newUnsupportedOperationException( "Removing is not supported"); } }; }