T
- The type that will be used to check if your ticket matchespublic abstract class SimpleTicket<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
isValid |
Constructor and Description |
---|
SimpleTicket() |
Modifier and Type | Method and Description |
---|---|
void |
invalidate()
Removes the ticket from the managing system.
|
boolean |
isValid()
Checks if your ticket is still registered in the system.
|
abstract boolean |
matches(T toMatch) |
void |
setBackend(ITicketManager<T> ticketManager)
Internal method that sets the collection from the managing system.
|
void |
validate()
Re-adds your ticket to the system.
|
public final void setBackend(@Nonnull ITicketManager<T> ticketManager)
FarmlandWaterManager
public boolean isValid()
public void invalidate()
isValid()
should return false unless it is registered again using validate()
public void validate()
public abstract boolean matches(T toMatch)