Dorkinator 64 Posted June 4, 2017 Please package evaluator; /** * Created by Dorkinator on 6/3/2017. */ public abstract class Evaluator <C> { public abstract double evaluate(C i); } Add public T getBest(Filter<T> filter, Evaluator<T> evaluator){ T out = null; double best = Double.MIN_VALUE; List<T> objects = all(filter); for(T i:objects){ double tmp; if((tmp = evaluator.evaluate(i)) > best){ best = tmp; out = i; } } return out; } This Credit to T$ for this.
hexagon 18 Posted June 21, 2017 https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html Hello?
Dorkinator 64 Author Posted June 21, 2017 https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html Hello? I forgot about those. They weren't usable in topbot because j8, my b.
hexagon 18 Posted June 22, 2017 I forgot about those. They weren't usable in topbot because j8, my b.
Dorkinator 64 Author Posted June 22, 2017 Not sure why I thought that, I know I didn't use them because of something something j8.
Dogerina 330 Posted June 22, 2017 Not sure why I thought that, I know I didn't use them because of something something j8. Cool hat for u mate
Recommended Posts
Archived
This topic is now archived and is closed to further replies.