|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.motion.AbstractJoint
public abstract class AbstractJoint
Abstract implementation providing much of the functionality need to implement various Joints.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.robokind.api.motion.Joint |
---|
Joint.Id |
Field Summary | |
---|---|
protected Map<String,JointProperty> |
myProperties
JointProperties available from this Joint |
Fields inherited from interface org.robokind.api.motion.Joint |
---|
PROP_ENABLED, PROP_GOAL_POSITION |
Constructor Summary | |
---|---|
AbstractJoint(Joint.Id id)
Creates a new AbstractJoint with the given Id. |
Method Summary | ||
---|---|---|
protected void |
addProperty(JointProperty prop)
Adds a JointProperty to the Joint |
|
Joint.Id |
getId()
Returns the Joint's logical id. |
|
JointProperty |
getProperty(String name)
Returns the JointProperty with the given name. |
|
|
getProperty(String name,
Class<T> propertyType)
Returns the JointProperty with the given name, ensuring the value is assignable to propertyType. |
|
void |
propertyChange(PropertyChangeEvent pce)
|
|
protected void |
removeProperty(JointProperty prop)
Removes a JointProperty from the Joint |
Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier |
---|
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.robokind.api.motion.Joint |
---|
getDefaultPosition, getEnabled, getGoalPosition, getName, setEnabled |
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource |
---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
protected Map<String,JointProperty> myProperties
Constructor Detail |
---|
public AbstractJoint(Joint.Id id)
id
- Joint.Id of the new JointMethod Detail |
---|
public Joint.Id getId()
Joint
getId
in interface Joint
protected void addProperty(JointProperty prop)
prop
- JointProperty to addprotected void removeProperty(JointProperty prop)
prop
- JointProperty to removepublic <T> JointProperty<T> getProperty(String name, Class<T> propertyType)
Joint
getProperty
in interface Joint
T
- Value Type returned by the JointPropertyname
- name of the JointPropertypropertyType
- Class for T
public JointProperty getProperty(String name)
Joint
getProperty
in interface Joint
name
- name of the JointProperty
public void propertyChange(PropertyChangeEvent pce)
propertyChange
in interface PropertyChangeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |