gbif / parsers

Various GBIF parsers for dates, countries, language, taxon ranks, etc
Apache License 2.0
4 stars 8 forks source link

Suggestion to add isConfidenceDefinite() to ParseResult #3

Open cgendreau opened 9 years ago

cgendreau commented 9 years ago

I suggest to add isConfidenceDefinite() to the ParseResult class to make the check less verbose. The method signature could also be hasConfidence(CONFIDENCE).

timrobertson100 commented 9 years ago

I wouldn't understand what either did based on name alone. Perhaps:

  /**
   * Returns true only if the determined confidence level exceeds the given threshold
   */
  public boolean confidenceExceeds(int threshold) {...}
cgendreau commented 9 years ago

yes, good point, but the method should probably includes the threshold.