public Set<Entry<K, V>> entrySet() { removeExpiredEntries(); return super.entrySet(); }
/** * Keeps track of timed objects */ private class TimedEntry<K, V> extends BasicEntry<K, V> { private long mTimestamp; TimedEntry(K pKey, V pValue) { super(pKey, pValue); mTimestamp = System.currentTimeMillis(); } public V setValue(V pValue) { mTimestamp = System.currentTimeMillis(); return super.setValue(pValue); } final boolean isExpired() { return isExpiredBy(System.currentTimeMillis()); } final boolean isExpiredBy(final long pTime) { return pTime > expires(); } final long expires() { return mTimestamp + expiryTime; } } }
public Set<Entry<K, V>> entrySet() { removeExpiredEntries(); return super.entrySet(); }
public Set<Entry<K, V>> entrySet() { removeExpiredEntries(); return super.entrySet(); }
public Set<Entry<K, V>> entrySet() { removeExpiredEntries(); return super.entrySet(); }
/** * Keeps track of timed objects */ private class TimedEntry<K, V> extends BasicEntry<K, V> { private long mTimestamp; TimedEntry(K pKey, V pValue) { super(pKey, pValue); mTimestamp = System.currentTimeMillis(); } public V setValue(V pValue) { mTimestamp = System.currentTimeMillis(); return super.setValue(pValue); } final boolean isExpired() { return isExpiredBy(System.currentTimeMillis()); } final boolean isExpiredBy(final long pTime) { return pTime > expires(); } final long expires() { return mTimestamp + expiryTime; } } }
/** * Keeps track of timed objects */ private class TimedEntry<K, V> extends BasicEntry<K, V> { private long mTimestamp; TimedEntry(K pKey, V pValue) { super(pKey, pValue); mTimestamp = System.currentTimeMillis(); } public V setValue(V pValue) { mTimestamp = System.currentTimeMillis(); return super.setValue(pValue); } final boolean isExpired() { return isExpiredBy(System.currentTimeMillis()); } final boolean isExpiredBy(final long pTime) { return pTime > expires(); } final long expires() { return mTimestamp + mExpiryTime; } } }
/** * Keeps track of timed objects */ private class TimedEntry<K, V> extends BasicEntry<K, V> { private long mTimestamp; TimedEntry(K pKey, V pValue) { super(pKey, pValue); mTimestamp = System.currentTimeMillis(); } public V setValue(V pValue) { mTimestamp = System.currentTimeMillis(); return super.setValue(pValue); } final boolean isExpired() { return isExpiredBy(System.currentTimeMillis()); } final boolean isExpiredBy(final long pTime) { return pTime > expires(); } final long expires() { return mTimestamp + expiryTime; } } }