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