如何在 javadoc 中记录 returns 元组的方法?
How do I document a method that returns a tuple in javadoc?
如何在 javadoc
中记录 returns 和 tuple
的方法?例如:
public Tuple2<Double,Double> arcadeDrive(double moveValue, double rotateValue, boolean ... sqrdRooted){
//Code
return new Tuple2<Double,Double>(leftMotorSpeed, -rightMotorSpeed);
我知道如何记录 parameters
和所有内容,但我不确定我应该如何表示返回的 tuple
。到目前为止,我一直在使用类似于
/**
* Commands for classic arcade drive.
*
* @param moveValue The speed (-1.0 ~ +1.0) to move in the Y direction at.
* @param rotateValue The speed (-1.0 ~ +1.0) to move in the Y direction at.
* @param sqrdRooted Squares the inputs if true
* @return (leftMotorSpeed, -rightMotorSpeed) Speed the Left motors are to be set to, Speed the right motors are to be set to
*/
我认为应该是:
@return 一个新的元组对象 描述 returned 对象的用途
您真的不需要插入整个变量类型。只需描述它是什么 returning 以及为什么用正常的语言。
如何在 javadoc
中记录 returns 和 tuple
的方法?例如:
public Tuple2<Double,Double> arcadeDrive(double moveValue, double rotateValue, boolean ... sqrdRooted){
//Code
return new Tuple2<Double,Double>(leftMotorSpeed, -rightMotorSpeed);
我知道如何记录 parameters
和所有内容,但我不确定我应该如何表示返回的 tuple
。到目前为止,我一直在使用类似于
/**
* Commands for classic arcade drive.
*
* @param moveValue The speed (-1.0 ~ +1.0) to move in the Y direction at.
* @param rotateValue The speed (-1.0 ~ +1.0) to move in the Y direction at.
* @param sqrdRooted Squares the inputs if true
* @return (leftMotorSpeed, -rightMotorSpeed) Speed the Left motors are to be set to, Speed the right motors are to be set to
*/
我认为应该是:
@return 一个新的元组对象 描述 returned 对象的用途
您真的不需要插入整个变量类型。只需描述它是什么 returning 以及为什么用正常的语言。