public int compareTo(ViewId other) {
        return id > other.id ? 1 : id < other.id ? -1 : creator.compareTo(other.creator);
    }
public int compareTo ( ViewId other ) { return id > other . id ? 1 : id < other . id ? - 1 : creator . compareTo ( other . creator ) ; }
Establishes an order between 2 ViewIds. The comparison is done on the IDs, if they are equal, we use the creator.

@return 0 for equality, value less than 0 if smaller, greater than 0 if greater.