LimitValue limitValue = getLimitValue(function, assignmentNumber); Set limitValues = new HashSet(1); limitValues.add(limitValue);
Limit[] limitsInDisplayOrder = function.getLimitsArray(); Set limitValues = new HashSet();  for (int i = 0; i < limitsInDisplayOrder.length; i++) { LimitValue limitValue = new LimitValue(limitsInDisplayOrder[i], makeChoiceValue(i)); limitValues.add(limitValue); }
  private Assignment createAssignment(int assignmentNumber)  throws  	SignetAuthorityException,  	ObjectNotFoundException  {    PrivilegedSubject superPrivilegedSubject    	= signet.getSuperPrivilegedSubject();    TreeNode rootNode = getRoot(tree);    Subject subject = getOrCreateSubject(assignmentNumber);    Function function = getOrCreateFunction(assignmentNumber);    LimitValue limitValue = getLimitValue(function, assignmentNumber);    Set limitValues = new HashSet(1);    limitValues.add(limitValue);        PrivilegedSubject pSubject = signet.getPrivilegedSubject(subject);    Assignment assignment    	= superPrivilegedSubject.grant    			(pSubject,    	     rootNode,    	     function,    	     limitValues,    	     true,    // canGrant    	     false);  // grantOnly        return assignment;  }