Untitled
By: a guest | Mar 20th, 2010 | Syntax:
Java | Size: 0.75 KB | Hits: 64 | Expires: Never
public Dataset getLocalMaximum(String stockName) {
if (stockName == null) {
throw new NullPointerException("String nicht initialisiert");
}
if (stockName == "") {
throw new IllegalArgumentException("Leerer String");
}
if (!ShareExploration.db.getMap().containsKey(stockName)) { // enthaelt die Treemap
// die Aktie?
return null; // wenn sie die Aktie nicht enthaelt wird null
// zurueckgegeben
} else {
DatasetMaxValComparator s = new DatasetMaxValComparator();
List<Dataset> temp = db.getEntry(stockName);
Collections.sort(temp, s);
return temp.get(0);
}
}