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 .