@Override
    public int compare(final C objectA, final C objectB) {
        if (this.comparators.isEmpty()) {
            return Order.asc.compare(objectA, objectB);
        } else {
            for (int i = this.startIndex; i < this.comparators.size(); i++) {
                final int comparison = this.comparators.get(i).compare(this.getObject(objectA, i), this.getObject(objectB, i));
                if (comparison != 0)
                    return comparison;
            }
            return 0;
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java