Object value1 = ((ParameterSelectionChoice) o1) .getValue(); Object value2 = ((ParameterSelectionChoice) o2) .getValue();
Object value1; Object value2; if(sortDisplayValue) { value1 = ((ParameterSelectionChoice) o1) .getLabel(); value2 = ((ParameterSelectionChoice) o2) .getLabel(); } else { value1 = ((ParameterSelectionChoice) o1) .getValue(); value2 = ((ParameterSelectionChoice) o2) .getValue(); }
		public int compare(Object o1, Object o2)		{			if ((o1 instanceof ParameterSelectionChoice)					&& (o2 instanceof ParameterSelectionChoice))			{				Object value1 = ((ParameterSelectionChoice) o1)						.getValue();				Object value2 = ((ParameterSelectionChoice) o2)						.getValue();				if (value1 != null && value2 != null)				{					return ((Comparable) value1)							.compareTo(value2);				}			}			return -1;		}