public class Countdown extends Object
| Constructor and Description |
|---|
Countdown(int startValue)
Instantiates a new countdown with a given start value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
decrease(int offset) |
int |
decrement()
Decrements this countdown by 1.
|
int |
expire()
Immediately expires this countdown.
|
int |
getRemainingValue() |
int |
getStartValue() |
boolean |
isActive()
Tells if this countdown is still active (meaning its remaining value is greater than 0)
|
boolean |
isAtStart()
Tells if this countdown is still full (meaning its remaining value is equal to its start value)
|
boolean |
isExpired()
Tells if this countdown is expired(meaning its remaining value is 0)
|
int |
reset()
Resets this countdown to its start value.
|
String |
toString() |
public Countdown(int startValue)
startValue - may not be negativepublic int getStartValue()
public int getRemainingValue()
public String toString()
public int decrement()
decrease(int)public int decrease(int offset)
offset - the offset to decrease this countdown withoffset due to preterm expiration of the countdown.decrement()public int reset()
public int expire()
public boolean isActive()
true if this countdown's remaining value is greater 0, false otherwise.isAtStart(),
isExpired()public boolean isExpired()
true if this countdown's remaining value 0, false otherwise.isActive(),
isAtStart()public boolean isAtStart()
true if this countdown's remaining value is the same as its start value,
false otherwise.isActive(),
isExpired()Copyright © 2022 MicroStream Software. All rights reserved.