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