Exemplo n.º 1
0
 /**
  * This method returns a DiscreteNumericalVariable with the specified key and retriever, but with
  * dummy information for the other fields in the variable.
  *
  * @param key the key to use for the variable
  * @param retriever the ValueRetriever for this variable
  * @return the constructed DiscreteNumericalVariable
  */
 private DiscreteNumericalVariable makeDiscreteNumerical(
     final String key, final ValueRetriever retriever) {
   final Category wbcWnl = new Category(new MultiSelectOption("WNL"), 11.0f, true);
   final Category wbcHigh =
       new Category(new MultiSelectOption(">11.0"), Float.POSITIVE_INFINITY, false);
   final DiscreteNumericalVariable var =
       new DiscreteNumericalVariable(
           "Generic Display Name",
           SampleModels.labVariableGroup(),
           ImmutableSet.of(wbcWnl, wbcHigh),
           key);
   var.setValidRange(new NumericalRange(2.0f, true, 50.0f, true));
   var.setUnits("generic units");
   var.setRetriever(retriever);
   return var;
 }