Ich weiß leider nicht, warum folgendes alles nicht funktioniert:
->
->
->
Hat jemand vielleicht eine Idee?
Java:
TreeMap<Map.Entry<Point2D, Info>, Double> distancesFromMostNeighbors = new TreeMap<>(Map.Entry.<Map.Entry<Point2D, Info>, Double>comparingByValue().reversed());
->
no instance(s) of type variable(s) exist so that Entry<Point2D, Info> conforms to Entry<Entry<Point2D, Info>, Double>
Java:
TreeMap<Map.Entry<Point2D, Info>, Double> distancesFromMostNeighbors = new TreeMap<>((Comparator) Map.Entry.<Map.Entry<Point2D, Info>, Double>comparingByValue().reversed());
->
Raw use of parameterized class 'Comparator'->
Unchecked call to 'TreeMap(Comparator<? super K>)' as a member of raw type 'java.util.TreeMap'Hat jemand vielleicht eine Idee?