public int compareTo(Object obj) {
        // System.out.println("COMPARE \"" + this + "\" to \"" + obj + "\" = " + key().compareTo(((DocImpl)obj).key()));
        return key().compareTo(((DocImpl)obj).key());
    }