Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Example {
- interface MyType {
- // Add methods here
- }
- private List<what-goes-here?> store = new ArrayList<>();
- public <T extends Enum<?> & MyType> void registerType(@Nonnull Class<T> type) {
- store.add(type);
- }
- public void processAll() {
- for (T t : store) { // Where do I define T?
- // process t
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement