Interface Progressable
-
- All Known Subinterfaces:
AdvancementProgress,CriterionProgress,ScoreCriterionProgress
public interface ProgressableRepresents the status that is achieved or is in the process of being achieved.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanachieved()Gets whether thisProgressableis achieved.Optional<Instant>get()Gets the time that theProgressablewas achieved if present.Instantgrant()Grants thisProgressable, if achieved before that time will be returned.Optional<Instant>revoke()Revokes theProgressablestatus.
-
-
-
Method Detail
-
achieved
default boolean achieved()
Gets whether thisProgressableis achieved.- Returns:
- Is achieved
-
get
Optional<Instant> get()
Gets the time that theProgressablewas achieved if present.- Returns:
- The achieving time, if present
-
grant
Instant grant()
Grants thisProgressable, if achieved before that time will be returned.- Returns:
- The achieving time
-
revoke
Optional<Instant> revoke()
Revokes theProgressablestatus. The time that theProgressablewas achieved before will be returned if present.- Returns:
- The previous achieving time, if present
-
-