org.robokind.api.common.property
Class PropertyChangeActionBase<T extends PropertyChangeEvent>

java.lang.Object
  extended by org.robokind.api.common.property.PropertyChangeActionBase<T>
Type Parameters:
T - Type of PropertyChangeEvent accept
Direct Known Subclasses:
IndexedPropertyChangeAction, PropertyChangeAction

public abstract class PropertyChangeActionBase<T extends PropertyChangeEvent>
extends Object

Base class for PropertyChangeActions to use with a PropertyChangeMonitor

Author:
Matthew Stevenson

Constructor Summary
PropertyChangeActionBase()
           
 
Method Summary
abstract  Class<T> getEventType()
          Returns the PropertyChangeEvent type accepted, T.
 void performAction(PropertyChangeEvent event)
          Performs the action with the given event only if the event is an instance of T
protected abstract  void run(T event)
          Action to perform when a PropertyChangeEvent of type T is found
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyChangeActionBase

public PropertyChangeActionBase()
Method Detail

performAction

public void performAction(PropertyChangeEvent event)
Performs the action with the given event only if the event is an instance of T

Parameters:
event - event for the property being changed

run

protected abstract void run(T event)
Action to perform when a PropertyChangeEvent of type T is found

Parameters:
event -

getEventType

public abstract Class<T> getEventType()
Returns the PropertyChangeEvent type accepted, T.

Returns:
T


Copyright © 2011-2013. All Rights Reserved.