if(!this.value.getAllowNullValue() && initialValue == null)
if(!this.value.getAllowNullValue() && constants.length == 0)
/** * Creates a new YoEnum with the same parameters as this one, and registers it to the passed {@link YoVariableRegistry}. * * @param newRegistry YoVariableRegistry to duplicate this YoEnum to * @return the newly created and registered YoEnum */ @Override public YoEnum<T> duplicate(YoVariableRegistry newRegistry) { YoEnum<T> retVar = new YoEnum<>(getName(), getDescription(), newRegistry, getEnumType(), getAllowNullValue()); retVar.set(getEnumValue()); return retVar; }
yoVariableDefinition.setAllowNullValues(((YoEnum<?>) variable).getAllowNullValue()); break; default: