java.lang.Object
org.autogui.base.mapping.GuiTaskClock
- All Implemented Interfaces:
Cloneable
,Comparable<GuiTaskClock>
clock of a context or a view.
both the context(
view
=false) and the view(view
=true) maintain each clock.
values are passed between the context and the view with clocks.
the one of two sides, the context or the view, takes a passed value with an opponent clock,
and if the current clock of the side is older than the opponent clock,
then it can accept the value and updates the clock with the opponent one:
isOlderWithSet(GuiTaskClock)
.
The one side updates its value (e.g. a user edits the GUI value of the view),
then the clock of the side increment()
and copy()
and send it to the other side.
the class is introduced in order to support delayed updating of context values (with the delayed-task-runner)
-
Field Details
-
count
protected volatile long count -
view
protected boolean view
-
-
Constructor Details
-
GuiTaskClock
public GuiTaskClock(boolean view) -
GuiTaskClock
public GuiTaskClock(long count, boolean view)
-
-
Method Details
-
clear
public void clear() -
isNewer
-
isOlderWithSet
-
increment
-
copy
-
compareTo
- Specified by:
compareTo
in interfaceComparable<GuiTaskClock>
-
equals
-
hashCode
public int hashCode() -
toString
-