/** * Gets the size of the map. * * @return the size */ @Override public int size() { purgeBeforeRead(); return super.size(); }
/** * Checks whether the map is currently empty. * * @return true if the map is currently size zero */ @Override public boolean isEmpty() { purgeBeforeRead(); return super.isEmpty(); }
@Override public K previous() { return super.previousEntry().getKey(); } }
/** * All expired entries are removed from the map prior to determining the * contains result. * {@inheritDoc} */ @Override public boolean containsValue(final Object value) { removeAllExpired(now()); return super.containsValue(value); }
/** * All expired entries are removed from the map prior to returning the key set. * {@inheritDoc} */ @Override public Set<K> keySet() { removeAllExpired(now()); return super.keySet(); }
/** * All expired entries are removed from the map prior to returning the entry value. * {@inheritDoc} */ @Override public V get(final Object key) { removeIfExpired(key, now()); return super.get(key); }
/** * All expired entries are removed from the map prior to determining the * contains result. * {@inheritDoc} */ @Override public boolean containsKey(final Object key) { removeIfExpired(key, now()); return super.containsKey(key); }
@Override public Set<Map.Entry<K, V>> entrySet() { final Set<Map.Entry<K, V>> set = super.entrySet(); return UnmodifiableEntrySet.unmodifiableEntrySet(set); }
/** * {@inheritDoc} */ @Override public OrderedMapIterator<K, V> mapIterator() { return new SortedMapIterator<>(entrySet()); }
@Override public Set<Map.Entry<K, V>> entrySet() { final Set<Map.Entry<K, V>> set = super.entrySet(); return UnmodifiableEntrySet.unmodifiableEntrySet(set); }
/** * {@inheritDoc} */ @Override public MapIterator<K, V> mapIterator() { return new EntrySetToMapIteratorAdapter<>(entrySet()); } }