public abstract class SimpleBinding extends java.lang.Object implements Binding
Binding that hides the complicated method signature required
of that interface. Instead, implementors can override the onUpdate() function for
their listener's behavior. Any "on" parameters can be passed in at creation time.| Constructor and Description |
|---|
SimpleBinding()
Default constructor that will fire on any model update.
|
SimpleBinding(T... on)
Constructor that will make it so this
Binding only fires on the given
"on" parameters. |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<java.lang.Object> |
getLastChanged()
Gets the set of
ModelUpdates that occurred on the last update. |
abstract void |
onUpdate()
This will be called when the model is changed in a way compatible with the "on"
parameters specified at compile time.
|
<T extends java.lang.Enum<?> & ModelUpdate> |
update(T... changes)
Fires an update on this
Binding object for the specified types. |
public SimpleBinding()
public SimpleBinding(T... on)
Binding only fires on the given
"on" parameters.public <T extends java.lang.Enum<?> & ModelUpdate> void update(T... changes)
Binding object for the specified types.update in interface Bindingchanges - varargs of ModelUpdate types that are being fired by this call.public com.google.common.collect.ImmutableSet<java.lang.Object> getLastChanged()
ModelUpdates that occurred on the last update.public abstract void onUpdate()