Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public enum CollectionType
- {
- TreeSet(TreeSet.class),
- ArrayList(ArrayList.class),
- LinkedList(LinkedList.class);
- private final Class<?> collectionClass;
- private CollectionType(Class<?> collectionClass) {
- this.collectionClass = collectionClass;
- }
- public Class<?> getCollectionClass()
- {
- return collectionClass;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement