public int compareTo( Object other ) { final NodeProxy p = (NodeProxy) other; if ( doc.docId == p.doc.docId ) { if ( gid == p.gid ) return 0; else if ( gid < p.gid ) return -1; else return 1; } else if ( doc.docId < p.doc.docId ) return -1; else return 1; }
public int compareTo(NodeProxy other) { final int diff = doc.docId - other.doc.docId; return diff == 0 ? (gid < other.gid ? -1 : (gid > other.gid ? 1 : 0)) : diff; }
    public int compareTo( Object other ) {		final NodeProxy p = (NodeProxy) other;		if ( doc.docId == p.doc.docId ) {			if ( gid == p.gid )				return 0;			else if ( gid < p.gid )				return -1;			else				return 1;		} else if ( doc.docId < p.doc.docId )			return -1;		else			return 1;    }