T - the typepublic interface CooldownMap<T>
| Modifier and Type | Method and Description |
|---|---|
static <T> CooldownMap<T> |
create(Cooldown base)
Creates a new collection with the cooldown properties defined by the base instance
|
long |
elapsed(T key) |
Cooldown |
get(T key)
Gets the internal cooldown instance associated with the given key
|
Map<T,Cooldown> |
getAll()
Gets the cooldowns contained within this collection.
|
Cooldown |
getBase()
Gets the base cooldown
|
OptionalLong |
getLastTested(T key) |
void |
put(T key,
Cooldown cooldown) |
long |
remainingMillis(T key) |
long |
remainingTime(T key,
TimeUnit unit) |
void |
reset(T key) |
boolean |
test(T key) |
boolean |
testSilently(T key) |
@Nonnull static <T> CooldownMap<T> create(@Nonnull Cooldown base)
base - the cooldown to base off@Nonnull Cooldown get(@Nonnull T key)
key - the key@Nonnull Map<T,Cooldown> getAll()
@Nonnull OptionalLong getLastTested(@Nonnull T key)
Copyright © 2017. All rights reserved.