Limit limit = function.getLimitsArray()[0]; Set choices = limit.getChoiceSet().getChoices(); String desiredChoiceValue = makeChoiceValue(limitValueNumber); Choice choice = null;  Iterator choicesIterator = choices.iterator(); while (choicesIterator.hasNext()) { Choice candidateChoice = (Choice)(choicesIterator.next()); if (desiredChoiceValue.equals(candidateChoice.getValue())) { choice = candidateChoice; break; } }
Limit limit = function.getLimitsArray()[limitAndValueNumber]; Choice[] choices = limit.getChoiceSet().getChoicesInDisplayOrder(); Choice choice = choices[limitAndValueNumber];
  private LimitValue getLimitValue  	(Function function,  	 int			limitValueNumber)  throws ObjectNotFoundException  {    Limit limit = function.getLimitsArray()[0];    Set choices = limit.getChoiceSet().getChoices();    String desiredChoiceValue = makeChoiceValue(limitValueNumber);    Choice choice = null;        Iterator choicesIterator = choices.iterator();    while (choicesIterator.hasNext())    {      Choice candidateChoice = (Choice)(choicesIterator.next());      if (desiredChoiceValue.equals(candidateChoice.getValue()))      {        choice = candidateChoice;        break;      }    }        LimitValue limitValue = new LimitValue(limit, choice.getValue());    return limitValue;  }