Lines Matching refs:cardinality
230 final int [] cardinality = optdef.getValueCardinality ();
232 if (cardinality [1] < 1)
248 final int [] cardinality = optdef.getValueCardinality ();
252 if (valueCount < cardinality [0])
254 opts.addError (formatMessage ("option \'" + opt.getName () + "\' does not accept fewer than " + cardinality [0] + " value(s)"));
263 if (valueCount < cardinality [1])
272 // if (valueCount < cardinality [0])
274 // opts.addError (formatMessage ("option \'" + opt.getName () + "\' does not accept fewer than " + cardinality [0] + " value(s)"));
314 if (opt != null) // validate the last option's min cardinality
316 final int [] cardinality = optdef.getValueCardinality ();
318 if (valueCount < cardinality [0])
320 opts.addError (formatMessage ("option \'" + opt.getName () + "\' does not accept fewer than " + cardinality [0] + " value(s)"));
358 // // validation: value cardinality constraints
360 // final int [] cardinality = optdef.getValueCardinality ();
361 // if (opt.getValueCount () < cardinality [0])
362 // opts.addError (formatMessage ("option \'" + opt.getName () + "\' must have at least " + cardinality [0] + " value(s)"));
363 // else if (opt.getValueCount () > cardinality [1])
364 // opts.addError (formatMessage ("option \'" + opt.getName () + "\' must not have more than " + cardinality [1] + " value(s)"));
442 final int [] cardinality = optdef.getValueCardinality ();
444 if (valueCount < cardinality [1]) return false;
869 void setValueCardinality (final int [] cardinality)
871 if ((cardinality == null) || (cardinality.length != 2)) throw new IllegalArgumentException ("null or invalid input: cardinality");
873 m_valueCardinality = cardinality;
1032 * "," "values" ":" cardinality
1037 * cardinality := "0" | "1" | "?"
1140 optdef.setValueCardinality (cardinality ());
1176 int [] cardinality ()
1507 // final int [] cardinality = optdef.getValueCardinality ();
1511 // if ((cardinality [1] != 0) && (cardinality [1] != Integer.MAX_VALUE))
1512 // throw new IllegalArgumentException ("option [" + optdef.getCanonicalName () + "] is mergeable and can only specify {0, +inf} for max value cardinality: " + cardinality [1]);