Misc code householding

- Checkstyle config: allow todo comments with issue number
- Create consistency tests across all classes, ensuring: unique class names, users of expiring collectors implement HasCleanup, non-private fields are only constants
- Fix tag replacement in PlayerListener for {DISPLAYNAME}
This commit is contained in:
ljacqu
2017-03-26 13:20:40 +02:00
parent 8cf7983027
commit 75f84945fc
9 changed files with 210 additions and 11 deletions
@@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
*/
public class ExpiringMap<K, V> {
protected final Map<K, ExpiringEntry<V>> entries = new ConcurrentHashMap<>();
private final Map<K, ExpiringEntry<V>> entries = new ConcurrentHashMap<>();
private long expirationMillis;
/**
@@ -105,6 +105,13 @@ public class ExpiringMap<K, V> {
return entries.isEmpty();
}
/**
* @return the internal map
*/
protected Map<K, ExpiringEntry<V>> getEntries() {
return entries;
}
/**
* Class holding a value paired with an expiration timestamp.
*