public String serialize() { StringBuilder sb = new StringBuilder(); Iterator<T> iter = valueSorMap.keySet().iterator(); while (iter.hasNext()) { T elem = iter.next(); sb.append(elem).append("/").append(getDegree(elem).getValue()); if (iter.hasNext()) sb.append(", "); } return sb.toString(); }
public T getBest() { return valueSorMap.isEmpty() ? null : valueSorMap.keySet().iterator().next(); }
public Set<T> getSupport() { return valueSorMap.keySet(); }
public Iterator<T> iterator() { return valueSorMap.keySet().iterator(); }