There is a frequently-seen idiom that goes as follows:
public interface ResultItem> {
public int getConfidence();
public boolean equals(T item);
public T cloneWithConfidence(int newConfidence);
}
public class IntResult implements ResultItem {
//...
}