コード例 #1
0
 public String getInvalidValueText(Frame frame, Slot slot, Object value, Collection facetValues) {
   String result = null;
   Number n = (Number) CollectionUtilities.getFirstItem(facetValues);
   if (n != null) {
     double max = n.doubleValue();
     result = getInvalidValueText(max, value);
   }
   return result;
 }
コード例 #2
0
 public String getInvalidValuesText(
     Frame frame, Slot slot, Collection slotValues, Collection facetValues) {
   String result = null;
   Number n = (Number) CollectionUtilities.getFirstItem(facetValues);
   if (n != null) {
     double max = n.doubleValue();
     Iterator i = slotValues.iterator();
     while (result == null && i.hasNext()) {
       Object value = i.next();
       result = getInvalidValueText(max, value);
     }
   }
   return result;
 }
コード例 #3
0
 private static double getValue(Collection values) {
   Number n = (Number) CollectionUtilities.getFirstItem(values);
   return (n == null) ? Double.MAX_VALUE : n.doubleValue();
 }