Forum Stats

  • 3,760,189 Users
  • 2,251,663 Discussions
  • 7,871,018 Comments

Discussions

Enums and Comparators generics...

843793
843793 Member Posts: 41,732 Green Ribbon
edited Jun 4, 2010 1:16PM in Generics
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;
	}

Comments

This discussion has been closed.