This discussion is archived
1 Reply Latest reply: Jun 4, 2010 10:16 AM by jtahlborn RSS

Enums and Comparators generics...

843793 Newbie
Currently Being Moderated
So I have really hit a wall here...

What I am trying to do is make a method which will take any Enum convert it to an Array (collection) and then sort it based on the comparator and return it...

I've been playing with it for a while... I really can't figure it out.. I truly don't have a great understanding of generics...

This is currently the mess sitting in my eclipse.
public <T, E> ArrayList<T> sortEnum(EnumSet<E extends Enum<E>> arg0, Comparator<? super T> arg1){
          return null;
     }