code: @Override
    public int compare(final Ordered ordered1, final Ordered ordered2) {
      return (ordered1.getIndex() < ordered2.getIndex() ? -1 : (ordered1.getIndex() > ordered2.getIndex() ? 1 : 0));
    }
docs: Compares two Ordered objects to determine their relative order by index.
  
  @param ordered1 the first Ordered object in the order comparison.
  @param ordered2 the second Ordered object in the order comparison.
  @return an integer value indicating one Ordered object's order relative to another Ordered object.