TickClient
, java.lang.Comparable<TickClient>
public class StdTickClient extends java.lang.Object implements TickClient
Modifier and Type | Field | Description |
---|---|---|
Tickable |
clientObject |
|
long |
lastStart |
|
long |
lastStop |
|
long |
milliTotal |
|
long |
nanoTotal |
|
int |
reTickDown |
|
java.lang.String |
status |
|
boolean |
suspended |
|
int |
tickDown |
|
int |
tickID |
|
int |
tickTotal |
Constructor | Description |
---|---|
StdTickClient(Tickable newClientObject,
int newTickDown,
int newTickID) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(TickClient arg0) |
|
boolean |
equals(java.lang.Object obj) |
|
Tickable |
getClientObject() |
Returns the ticking object that this client encapsulates
|
int |
getCurrentTickDown() |
Returns the number of ticks remaining before the internal object is
allowed to get thread time.
|
long |
getLastStartTime() |
Returns the time, in ms, that this object last ticked.
|
long |
getLastStopTime() |
Returns the time, in ms, that this object last stopped ticking.
|
long |
getMilliTotal() |
Returns the number of ms that this object has ticked in total
|
java.lang.String |
getName() |
Returns the name of this ticking client as a
displayable String, usually just a translation
of the
Tickable.name() |
java.lang.String |
getStatus() |
Returns the status of this ticking client as a
displayable String, usually just a translation
of the
Tickable.getTickStatus() |
int |
getTickID() |
Returns the TICKID_ constant assigned to this object
|
long |
getTickTotal() |
Returns the number of times that this object has ticked in total
|
long |
getTimeMSToNextTick() |
Gets the number of total milliseconds before another tick
will occur., or -1.
|
int |
getTotalTickDown() |
Returns the number of ticks total before the internal object is
allowed to get thread time.
|
int |
hashCode() |
|
boolean |
isAwake() |
Returns true if this is currently getting thread time
|
boolean |
isSuspended() |
Returns true if this object is currently suspended
|
void |
setCurrentTickDownPending() |
Sets the number of ticks remaining before the internal object is
allowed to get thread time to 1.
|
void |
setStatus(java.lang.String status) |
Sets the status of this ticking client as a
displayable String
|
void |
setSuspended(boolean trueFalse) |
Sets whether this object is suspended from getting thread time
|
boolean |
tickTicker(boolean forceTickDown) |
Potentially allows the internal object to be ticked.
|
public final Tickable clientObject
public final int tickID
public final int reTickDown
public volatile int tickDown
public boolean suspended
public volatile long lastStart
public volatile long lastStop
public volatile long milliTotal
public volatile long nanoTotal
public volatile int tickTotal
public volatile java.lang.String status
public StdTickClient(Tickable newClientObject, int newTickDown, int newTickID)
public java.lang.String getName()
TickClient
Tickable.name()
getName
in interface TickClient
public final Tickable getClientObject()
TickClient
getClientObject
in interface TickClient
Tickable
public final int getTickID()
TickClient
getTickID
in interface TickClient
Tickable.TICKID_AREA
public int getTotalTickDown()
TickClient
getTotalTickDown
in interface TickClient
public int getCurrentTickDown()
TickClient
getCurrentTickDown
in interface TickClient
public java.lang.String getStatus()
TickClient
Tickable.getTickStatus()
getStatus
in interface TickClient
Tickable.getTickStatus()
public void setStatus(java.lang.String status)
TickClient
setStatus
in interface TickClient
status
- the new status to set this client toTickClient.getStatus()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(TickClient arg0)
compareTo
in interface java.lang.Comparable<TickClient>
public void setCurrentTickDownPending()
TickClient
setCurrentTickDownPending
in interface TickClient
public long getTimeMSToNextTick()
TickClient
getTimeMSToNextTick
in interface TickClient
public boolean tickTicker(boolean forceTickDown)
TickClient
tickTicker
in interface TickClient
forceTickDown
- true to override the currentTickDownTickable.tick(Tickable, int)
public long getLastStartTime()
TickClient
getLastStartTime
in interface TickClient
public long getLastStopTime()
TickClient
getLastStopTime
in interface TickClient
public long getMilliTotal()
TickClient
getMilliTotal
in interface TickClient
public long getTickTotal()
TickClient
getTickTotal
in interface TickClient
public boolean isAwake()
TickClient
isAwake
in interface TickClient
public boolean isSuspended()
TickClient
isSuspended
in interface TickClient
public void setSuspended(boolean trueFalse)
TickClient
setSuspended
in interface TickClient
trueFalse
- true to suspend it, false to unsuspend it