The compare method returns a single int (not an array), but I have to iterate through each comparator, each of which has a compare method of its own that returns an int. It can be assumed that for some of the comparators passed, o1 > o2, and for other comparators o2 > o1. So how to I return the result of each comparator while only being able to return a single int? What I'm working with so far following the conditions:
public static class CustomizedComparator<T> implements Comparator<T>
{
    private Comparator<T>[] comparators;

    public CustomizedComparator(Comparator<T> ...comparators)
    {
        this.comparators = comparators;
    }

    @Override
    public int compare(Object o1, Object o2)
    {
        for(Comparator<T> comparator : comparators)
        {
            return comparator.compare((T)o1, (T)o2);
        }
    }
}
But this wouldn't make any sense. It would only return the first iteration of the for loop. I could simplify the loop to just be:
return comparators[0].compare((T)o1, (T)o2);
But the other thing that confuses me is that even if I could sort o1 and o2 by all of the comparators in order, that would be equivalent to just sorting by the last one. For example, if I am sorting strings by multiple criteria: s1 = "bath" s2 = "alchemy" s3 = "miscellaneous" and I have 3 comparators passed as arguments in this order: c1 = sort alphabetically c2 = sort by string length c3 = sort by number of vowels (least to most) First it would sort by c1, which would produce: "alchemy", "bath", "miscellaneous" Then it would sort by c2, which would produce: "miscellaneous", "alchemy", "bath" And finally it would sort by c3, which would produce: "bath", "alchemy", "miscellaneous" But I could accomplish the same thing by only sorting by c3 and skipping c1 and c2. Obviously I don't understand what the task is asking me to do (this happens quite often!).