us.ihmc.yoVariables.variable.YoVariableList.addVariable()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中us.ihmc.yoVariables.variable.YoVariableList.addVariable()方法的一些代码示例,展示了YoVariableList.addVariable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariableList.addVariable()方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoVariableList
类名称:YoVariableList
方法名:addVariable

YoVariableList.addVariable介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/ihmc-yovariables

public void addVariables(YoVariable<?>[] variables)
{
 for (int i = 0; i < variables.length; i++)
 {
   this.addVariable(variables[i]);
 }
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

public void addVariables(ArrayList<YoVariable<?>> list)
{
 for (YoVariable<?> variable : list)
 {
   this.addVariable(variable);
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void addVariableAndSetInitialValue(float initialValue, String fullVariableName, YoVariable<?> variable)
{
 System.out.println("Found var: " + fullVariableName);
 allVariables.addVariable(variable);
 variable.setValueFromDouble(initialValue);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-test

private ArrayList<YoVariable<?>> getSimpleRobotRegExpVariables(String[] varNames, String[] regularExpressions, Robot robotModel)
{
 ArrayList<YoVariable<?>> currentlyMatched = robotModel.getAllVariables();
 YoVariableList tempList = new YoVariableList("temp");
 for (int i = 0; i < currentlyMatched.size(); i++)
 {
   YoVariable var = currentlyMatched.get(i);
   tempList.addVariable(var);
 }
 return tempList.getMatchingVariables(varNames, regularExpressions);
}

代码示例来源:origin: us.ihmc/ihmc-yovariables

public ArrayList<YoVariable<?>> getVars(String[] varNames, String[] regularExpressions)
{
 YoVariableList tempList = new YoVariableList("temp");
 for (int i = 0; i < entries.size(); i++)
 {
   YoVariable<?> var = (entries.get(i)).getVariable();
   tempList.addVariable(var);
 }
 return tempList.getMatchingVariables(varNames, regularExpressions);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

varList.addVariable(foo);

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void createAndAddVariableAndSetInitialValue(float initialValue, String fullVariableName)
{
 NameSpace fullNameSpace = NameSpace.createNameSpaceFromAFullVariableName(fullVariableName);
 YoVariableRegistry registry = rootRegistry.getRegistry(fullNameSpace);
 String shortVariableName = NameSpace.stripOffNameSpaceToGetVariableName(fullVariableName);
 YoDouble newVar = new YoDouble(shortVariableName, "", registry);
 allVariables.addVariable(newVar);
 newVar.set(initialValue);
 System.out.println("Didn't Find var: " + fullVariableName);
 notifyCreatedNewVariablesListeners(newVar);
 
}

相关文章