@Override
    public int compare(final S objectA, final S objectB) {
        for (final Pair<Traversal.Admin<S, C>, Comparator<C>> pair : this.comparators) {
            final int comparison = this.traversers ?
                    pair.getValue1().compare(TraversalUtil.apply((Traverser.Admin<S>) objectA, pair.getValue0()), TraversalUtil.apply((Traverser.Admin<S>) objectB, pair.getValue0())) :
                    pair.getValue1().compare(TraversalUtil.apply(objectA, pair.getValue0()), TraversalUtil.apply(objectB, pair.getValue0()));
            if (comparison != 0)
                return comparison;
        }
        return 0;
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@deprecated As of release 3.6.0, not replaced.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/ChainedComparator.java