Class PositionTable
java.lang.Object
|
+--PositionTable
- public class PositionTable
- extends java.lang.Object
A class to store named positions. The PositionTable class is an
implementation of the Singleton Pattern, as shown in Gamma et al (p. 127),
which ensures only one instance of the class is created, and provides access
to that instance.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
putNamedPosition
public void putNamedPosition(java.lang.String name,
JointVariables joints)
- Puts a new Point3d into the table, using the given name.
- Parameters:
name
- the name for the endpoint.joints
- the set of joint variables for the Robot.
getNamedPosition
public JointVariables getNamedPosition(java.lang.String name)
- Returns the joint variables for the saved position with the given name
from the table.
- Parameters:
name
- the name of the position to retrieve.- Returns:
- the set of joint variables retrieved from the table.
getInstance
public static PositionTable getInstance()
- Returns the unique instance of the XYZTable class. The actual instance
isn't initialized until
getInstance
is called by another
object.
- Returns:
- the only instance of the XYZTable.