gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 12:36:40 26 4
gpt4 key购买 nike

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

YoVariable.getYoVariableRegistry介绍

[英]Retrieves the YoVariableRegistry this variable belongs to.
[中]检索此变量所属的YoVariableRegistry。

代码示例

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

@Override
public ArrayList<YoVariable<?>> getVariables(String nameSpaceEnding, String name)
{
 if (name.contains("."))
 {
   throw new RuntimeException(name + " contains a dot. It must not when calling getVariables(String nameSpace, String name)");
 }
 ArrayList<YoVariable<?>> variablesWithThisName = yoVariableSet.get(name.toLowerCase());
 if (variablesWithThisName == null)
 {
   return new ArrayList<YoVariable<?>>(0);
 }
 ArrayList<YoVariable<?>> ret = new ArrayList<YoVariable<?>>();
 for (int i = 0; i < variablesWithThisName.size(); i++)
 {
   YoVariable<?> yoVariable = variablesWithThisName.get(i);
   if (yoVariable.getYoVariableRegistry().getNameSpace().endsWith(nameSpaceEnding))
   {
    ret.add(yoVariable);
   }
 }
 return ret;
}

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

@Override
  public ArrayList<YoVariable<?>> getVariables(NameSpace nameSpace)
  {
   ArrayList<YoVariable<?>> ret = new ArrayList<YoVariable<?>>();

   Collection<ArrayList<YoVariable<?>>> variableLists = yoVariableSet.values();

   for (ArrayList<YoVariable<?>> list : variableLists)
   {
     for (YoVariable<?> variable : list)
     {
      if (variable.getYoVariableRegistry().getNameSpace().equals(nameSpace))
      {
        ret.add(variable);
      }
     }
   }

   return ret;
  }
}

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

public ArrayList<YoVariable<?>> getVariables(NameSpace nameSpace)
{
 ArrayList<YoVariable<?>> ret = new ArrayList<YoVariable<?>>();
 ArrayList<YoVariable<?>> allVariables = getAllVariables();
 for (YoVariable<?> variable : allVariables)
 {
   if (variable.getYoVariableRegistry().getNameSpace().equals(nameSpace))
   {
    ret.add(variable);
   }
 }
 return ret;
}

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

@Override
public YoVariable<?> getVariable(String nameSpaceEnding, String name)
{
 if (name.contains("."))
 {
   throw new RuntimeException(name + " contains a dot. It must not when calling getVariable(String nameSpace, String name)");
 }
 
 ArrayList<YoVariable<?>> variablesWithThisName = yoVariableSet.get(name.toLowerCase());
 if (variablesWithThisName == null)
 {
   return null;
 }
 YoVariable<?> foundVariable = null;
 for (int i = 0; i < variablesWithThisName.size(); i++)
 {
   YoVariable<?> yoVariable = variablesWithThisName.get(i);
   if (yoVariable.getYoVariableRegistry().getNameSpace().endsWith(nameSpaceEnding))
   {
    if (foundVariable != null)
    {
      throw new RuntimeException("Called getVariable with " + nameSpaceEnding + ", " + name
                   + ". That is insufficient name information to distinguish a unique variable! Please include more of the name space!");
    }
    foundVariable = yoVariable;
   }
 }
 return foundVariable;
}

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

@Override
public boolean hasUniqueVariable(String nameSpaceEnding, String name)
{
 if (name.contains("."))
 {
   throw new RuntimeException(name + " contains a dot. It must not when calling hasVariable(String nameSpace, String name)");
 }
 ArrayList<YoVariable<?>> variablesWithThisName = yoVariableSet.get(name.toLowerCase());
 if (variablesWithThisName == null)
 {
   return false;
 }
 boolean foundVariable = false;
 for (int i = 0; i < variablesWithThisName.size(); i++)
 {
   YoVariable<?> yoVariable = variablesWithThisName.get(i);
   if (yoVariable.getYoVariableRegistry().getNameSpace().endsWith(nameSpaceEnding))
   {
    if (foundVariable)
    {
      return false;
    }
    foundVariable = true;
   }
 }
 return foundVariable;
}

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

private void updateSendVars()
{
 sendVariables.clear();
 int numberToIterate = allVariables.size();
 
 for (int i=0; i<numberToIterate; i++)
 {
   YoVariable<?> var = allVariables.getVariable(i);
 
   YoVariableRegistry registry = var.getYoVariableRegistry();
   if (registry.isSent())
   {
    sendVariables.add(var);
   }
 }
}

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

private void updateLogVarsCount()
{
 logVarsCount = 0;
 int numberToIterate = allVariables.size();
 
 for (int i=0; i<numberToIterate; i++)
 {
   YoVariable<?> var = allVariables.getVariable(i);
   if (var.getYoVariableRegistry().isLogged())
    logVarsCount++;
 }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com