org.robokind.api.motion.servos.utils
Class AbstractServoJointAdapter<S extends Servo>

java.lang.Object
  extended by org.robokind.api.motion.servos.utils.AbstractServoJointAdapter<S>
Type Parameters:
S - Type of Servo used
All Implemented Interfaces:
ServoJointAdapter<S,ServoJoint<S>>

public abstract class AbstractServoJointAdapter<S extends Servo>
extends Object
implements ServoJointAdapter<S,ServoJoint<S>>

Common functionality for ServoJointAdapters.

Author:
Matthew Stevenson

Constructor Summary
AbstractServoJointAdapter()
           
 
Method Summary
 ServoJoint<S> getJoint(Joint.Id jId, S s)
          Creates a ServoJoint with the given Joint.Id, Servo, and default JointProperties returned by getJointProperties
protected abstract  List<JointProperty> getJointProperties(S servo)
          Returns the default JointProperties for a new ServoJoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServoJointAdapter

public AbstractServoJointAdapter()
Method Detail

getJoint

public ServoJoint<S> getJoint(Joint.Id jId,
                              S s)
Creates a ServoJoint with the given Joint.Id, Servo, and default JointProperties returned by getJointProperties

Specified by:
getJoint in interface ServoJointAdapter<S extends Servo,ServoJoint<S extends Servo>>
Parameters:
jId - Joint.Id for the ServoJoint
s - Servo to use
Returns:
ServoJoint with the given Joint.Id, Servo, and default JointProperties returned by getJointProperties

getJointProperties

protected abstract List<JointProperty> getJointProperties(S servo)
Returns the default JointProperties for a new ServoJoint.

Parameters:
servo - Servo to get JointProperties for
Returns:
A List of the default JointProperties for a new ServoJoint


Copyright © 2011-2013. All Rights Reserved.