Пример #1
0
 public void addAlgorithm(IScoredScan scan) {
   String key = scan.getAlgorithm();
   if (m_Scores.containsKey(key)) {
     throw new IllegalStateException("duplicate algorithm " + key);
   } else {
     m_Scores.put(key, scan);
   }
 }
Пример #2
0
 /**
  * true if some match is scored
  *
  * @return as above
  */
 @Override
 public boolean isMatchPresent() {
   for (IScoredScan scan : m_Scores.values()) {
     if (scan.isMatchPresent()) return true;
   }
   return false;
 }
Пример #3
0
 /**
  * if present return a IScoredScan for an algorithm
  *
  * @param algorithm
  * @return either data of blank if null
  */
 @Override
 public IScoredScan getScoredScan(final String algorithm) {
   return m_Scores.get(algorithm);
 }
Пример #4
0
 /**
  * return a list of all algorithm names
  *
  * @return !null array
  */
 @Override
 public String[] getScoringAlgorithms() {
   String[] strings = m_Scores.keySet().toArray(new String[0]);
   Arrays.sort(strings);
   return strings;
 }