com.kuka.roboticsAPI.deviceModel
Class JointPositionBuilder

java.lang.Object
  extended by com.kuka.roboticsAPI.deviceModel.JointPositionBuilder

public class JointPositionBuilder
extends Object

Builder class for creating / manipulating JointPosition instances.


Constructor Summary
JointPositionBuilder(double... values)
          Creates an instance of the JoinPositionBuilder given as a parameter an array of doubles.
JointPositionBuilder(int length)
          Creates an instance of the JoinPositionBuilder given as a parameter the length of the array that later models the JoinPosition.
JointPositionBuilder(JointPosition jointPosition)
          Creates an instance of the JoinPositionBuilder given as a parameter a JointPosition.
 
Method Summary
 JointPosition build()
          Builds the new instance of the JointPosition from the data of the builder.
 double get(int index)
          Gets a position value in radians of the joint with the specified (zero-based) index.
 double get(com.kuka.roboticsAPI.deviceModel.JointEnum joint)
          Gets the position value for a specific joint in radians.
 JointPositionBuilder set(int index, double value)
          Sets a value to a specified new value in radians.
 JointPositionBuilder set(com.kuka.roboticsAPI.deviceModel.JointEnum index, double value)
          Sets all values of the vector to the defined value in radians of the other vector.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JointPositionBuilder

public JointPositionBuilder(JointPosition jointPosition)
Creates an instance of the JoinPositionBuilder given as a parameter a JointPosition.

Parameters:
jointPosition - the jointPosition

JointPositionBuilder

public JointPositionBuilder(double... values)
Creates an instance of the JoinPositionBuilder given as a parameter an array of doubles.

Parameters:
values - the array of doubles that later will model the information of the jointPosition

JointPositionBuilder

public JointPositionBuilder(int length)
Creates an instance of the JoinPositionBuilder given as a parameter the length of the array that later models the JoinPosition.

Parameters:
length - The joint count. Must not be negative.
Method Detail

set

public JointPositionBuilder set(int index,
                                double value)
Sets a value to a specified new value in radians.

Parameters:
index - The index.
value - The new value.
Returns:
the instance of the builder

set

public JointPositionBuilder set(com.kuka.roboticsAPI.deviceModel.JointEnum index,
                                double value)
Sets all values of the vector to the defined value in radians of the other vector. Will make a deep copy.

Parameters:
index - the jointEnum that must be edited.
value - The new value in radians. Must have the same length as the old values.
Returns:
the instance of the builder
See Also:
JointEnum

build

public JointPosition build()
Builds the new instance of the JointPosition from the data of the builder.

Returns:
a new immutable instance of a JointPosition

get

public double get(com.kuka.roboticsAPI.deviceModel.JointEnum joint)
Gets the position value for a specific joint in radians.

Parameters:
joint - The joint for which to query the position value.
Returns:
The value in radians at the specified index.
See Also:
JointEnum

get

public double get(int index)
Gets a position value in radians of the joint with the specified (zero-based) index.

Parameters:
index - The index (must be a valid joint index).
Returns:
The value in radians at the specified index.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All rights reserved.