/** * {@inheritDoc} */ @Override public int compareTo(BytesRefArrayWritable other) { if (other == null) { throw new IllegalArgumentException("Argument can not be null."); } if (this == other) { return 0; } int sizeDiff = valid - other.valid; if (sizeDiff != 0) { return sizeDiff; } for (int i = 0; i < valid; i++) { if (other.contains(bytesRefWritables[i])) { continue; } else { return 1; } } return 0; }