return maximum.compareTo(num) >= 0 ? num : null;
if ((maximum != null) && maximum.compareTo(num) < 0) num = null;  return num;
  public Object getNextValue()  {    Number num;    if (value instanceof Double)      num = new Double(value.doubleValue() + stepSize.doubleValue());    else if (value instanceof Float)      num = new Double(value.floatValue() + stepSize.floatValue());    else if (value instanceof Long)      num = new Long(value.longValue() + stepSize.longValue());    else if (value instanceof Integer)      num = new Integer(value.intValue() + stepSize.intValue());    else if (value instanceof Short)      num = new Short((short) (value.shortValue() + stepSize.shortValue()));    else      num = new Byte((byte) (value.byteValue() + stepSize.byteValue()));    return maximum.compareTo(num) >= 0 ? num : null;  }