/** * Returns an iterator over the elements of this set. * * @return an iterator over the elements of this set. */ public Iterator<E> iterator() { try { return _map.keyIterator(); } catch (DataAccessLayerException exception) { throw new RuntimeException(exception); } }
/** * Returns an iterator over the elements of this set. * * @return an iterator over the elements of this set. */ public Iterator<E> iterator() { try { return _map.keyIterator(); } catch (DataAccessLayerException exception) { throw new RuntimeException(exception); } }
/** * Returns an iterator over the values of this map. * * @return an iterator over the values of this map. * @throws DataAccessLayerException in case of data access failure. */ public Iterator<V> valueIterator() throws DataAccessLayerException { final Iterator<K> _key_iter = keyIterator(); return new AbstractIterator<V>() { @Override public V computeNext() { try { if (!_key_iter.hasNext()) { return endOfData(); } K key = _key_iter.next(); if (key == null) { return endOfData(); } return get(key); } catch (final DataAccessLayerException exception) { throw new RuntimeException(exception); } } }; }
/** * Returns an iterator over the values of this map. * * @return an iterator over the values of this map. * @throws DataAccessLayerException in case of data access failure. */ public Iterator<V> valueIterator() throws DataAccessLayerException { final Iterator<K> _key_iter = keyIterator(); return new AbstractIterator<V>() { @Override public V computeNext() { try { if (!_key_iter.hasNext()) { return endOfData(); } K key = _key_iter.next(); if (key == null) { return endOfData(); } return get(key); } catch (final DataAccessLayerException exception) { throw new RuntimeException(exception); } } }; }