@Override
    public int compareTo(final ObjectWritable objectWritable) {
        if (null == this.t)
            return objectWritable.isEmpty() ? 0 : -1;
        else if (this.t instanceof Comparable && !objectWritable.isEmpty())
            return ((Comparable) this.t).compareTo(objectWritable.get());
        else if (this.t.equals(objectWritable.get()))
            return 0;
        else
            return -1;
    }
Shrink the content to display for both Collection and Map
@return
hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java