/** * */ package se.lth.cs.nlp.opinions; class DPItem implements Comparable { DPItem prev; int label; double totalScore; public int compareTo(DPItem o) { return -Double.compare(totalScore, o.totalScore); } public boolean equals(Object o) { DPItem oi = (DPItem) o; return prev == oi.prev && label == oi.label; } }