本文整理了Java中us.ihmc.yoVariables.variable.YoEnum.getEnumValue()
方法的一些代码示例,展示了YoEnum.getEnumValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoEnum.getEnumValue()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoEnum
类名称:YoEnum
方法名:getEnumValue
[英]Retrieve the enum value of this YoEnum.
[中]检索此YoEnum的枚举值。
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@Override
public boolean testCondition(double time)
{
return footConstraintType.getEnumValue() == FootControlModule.ConstraintType.SWING;
}
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@Override
public boolean testCondition(double timeInState)
{
return footConstraintType.getEnumValue() == ConstraintType.SWING;
}
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@Override
public boolean testCondition(double time)
{
return footConstraintType.getEnumValue() == ConstraintType.SWING;
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* Gets the key of the active state.
*
* @return the current state key.
*/
public K getCurrentStateKey()
{
return currentStateKey.getEnumValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* Gets the key of the state that was previously active.
*
* @return the previous state key.
*/
public K getPreviousStateKey()
{
return previousStateKey.getEnumValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public E getPreviousStateEnum()
{
E stateEnum = previousStateYoVariable.getEnumValue();
return stateEnum;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* {@see #state}
*/
public S getCurrentStateEnum()
{
return stateEnum.getEnumValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public T getPreviousState()
{
E stateEnum = previousStateYoVariable.getEnumValue();
return enumsToStates.get(stateEnum);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private static <T extends Enum<T>> String getFormattedEnumYoVariable(final YoEnum<T> yoEnum)
{
String enumValueName = yoEnum.getEnumValue() != null ? yoEnum.getEnumValue().name() : "null";
return yoEnum.getName() + ":" + enumValueName;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
protected int getNumberOfCharactersForDisplay()
{
Enum<?>[] enumValues = ((Enum<?>) ((YoEnum<?>)yoVariable).getEnumValue()).getDeclaringClass().getEnumConstants();
int maxNumberOfCharacters = Integer.MIN_VALUE;
for (Enum<?> enumValue : enumValues)
{
if (enumValue.toString().length() > maxNumberOfCharacters)
maxNumberOfCharacters = enumValue.toString().length();
}
return maxNumberOfCharacters;
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* Sets the internal value of this YoEnum to the current value of the passed YoEnum.
*
* @param value YoEnum value to set this variable's value to
* @param notifyListeners boolean determining whether or not to call {@link #notifyVariableChangedListeners()}
* @return boolean whether or not internal state differed from the passed value
*/
@Override public boolean setValue(YoEnum<T> value, boolean notifyListeners)
{
return set(value.getEnumValue(), notifyListeners);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
@Override
public String getValueInStringFormat()
{
String ret = ((YoEnum<?>)yoVariable).getEnumValue().toString();
return padWithSpaces(ret, numberOfCharactersForDisplay);
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@SuppressWarnings("unchecked")
public static RigidBodyControlMode findControllerState(String bodyName, SimulationConstructionSet scs)
{
String headOrientatManagerName = bodyName + "Manager";
String headControlStateName = headOrientatManagerName + "CurrentState";
return ((YoEnum<RigidBodyControlMode>) scs.getVariable(headOrientatManagerName, headControlStateName)).getEnumValue();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
@SuppressWarnings("unchecked")
private static WalkingStateEnum getWalkingState(SimulationConstructionSet scs)
{
return (WalkingStateEnum) getYoVariable(scs, "WalkingCurrentState", WalkingHighLevelHumanoidController.class.getSimpleName(),
YoEnum.class).getEnumValue();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public void notifyOfVariableChange(YoVariable<?> v)
{
E newEvent = yoTrigger.getEnumValue();
if (newEvent != null)
{
eventTrigger.fireEvent(yoTrigger.getEnumValue());
yoTrigger.set(null);
}
}
});
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public void notifyOfVariableChange(YoVariable<?> v)
{
if (yoVariable.getEnumValue() != null)
{
stateMachine.trigger(enumType, yoVariable.getEnumValue());
// Reset to null to be ready for another event.
yoVariable.set(null);
}
}
});
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces
@Override
public void notifyOfVariableChange(YoVariable<?> v)
{
System.out.println("SliderBoardMode: " + sliderBoardMode.getEnumValue().toString());
sliderBoardConfigurationManager.loadConfiguration(sliderBoardMode.getEnumValue().toString());
}
};
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private boolean determineIfDirectionChanged(double currentPosition)
{
Direction currentDirection = computeDirectionOfMotion(currentPosition);
boolean directionOfMotionChanged = lastPosChangeDirection.getEnumValue() != currentDirection; lastPosChangeDirection.set(currentDirection);
return directionOfMotionChanged;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public boolean checkCondition()
{
boolean done = !waitUntilDone || fromState.isDone();
boolean transitionRequested = requestedStateTrigger.equals(requestedState.getEnumValue());
return done && transitionRequested;
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public Status update()
{
if (variableToCheck.getDoubleValue() > upperLimit)
status.set(Status.ABOVE_LIMIT);
else if (variableToCheck.getDoubleValue() < lowerLimit)
status.set(Status.BELOW_LIMIT);
else
status.set(Status.IN_RANGE);
return status.getEnumValue();
}
内容来源于网络,如有侵权,请联系作者删除!