Package com.palantir.ptoss.cinch.core
Class SimpleBinding
- java.lang.Object
- 
- com.palantir.ptoss.cinch.core.SimpleBinding
 
- 
- All Implemented Interfaces:
- Binding
 
 public abstract class SimpleBinding extends java.lang.Object implements Binding An implementation ofBindingthat hides the complicated method signature required of that interface. Instead, implementors can override theonUpdate()function for their listener's behavior. Any "on" parameters can be passed in at creation time.
- 
- 
Constructor SummaryConstructors Constructor Description SimpleBinding()Default constructor that will fire on any model update.SimpleBinding(T... on)Constructor that will make it so thisBindingonly fires on the given "on" parameters.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableSet<java.lang.Object>getLastChanged()Gets the set ofModelUpdates that occurred on the last update.abstract voidonUpdate()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>
 voidupdate(T... changes)Fires an update on thisBindingobject for the specified types.
 
- 
- 
- 
Constructor Detail- 
SimpleBindingpublic SimpleBinding() Default constructor that will fire on any model update.
 - 
SimpleBindingpublic SimpleBinding(T... on) Constructor that will make it so thisBindingonly fires on the given "on" parameters.
 
- 
 - 
Method Detail- 
updatepublic <T extends java.lang.Enum<?> & ModelUpdate> void update(T... changes) Fires an update on thisBindingobject for the specified types.- Specified by:
- updatein interface- Binding
- Parameters:
- changes- varargs of- ModelUpdatetypes that are being fired by this call.
 
 - 
getLastChangedpublic com.google.common.collect.ImmutableSet<java.lang.Object> getLastChanged() Gets the set ofModelUpdates that occurred on the last update.
 - 
onUpdatepublic abstract void onUpdate() This will be called when the model is changed in a way compatible with the "on" parameters specified at compile time.
 
- 
 
-