Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Iterator;
- import java.util.Set;
- /**
- *
- * @author Paolo
- */
- public class A extends B<Object> {
- private B<?> b;
- private String msg;
- public A(){
- b = new B<Object>(null);
- msg = B.<A>buildMessage(this);
- }
- public Set<? super Number> f(Set<Integer> set1, Set<String> set2) {
- for (Integer n: b)
- if (b.check(set1, n))
- return b.process(set1, set2, n);
- return b.process(set2, set1, null);
- }
- }
- class B<T> implements Iterable<Integer>{
- public boolean check(Set<?> s,int a){
- return s.contains(a);
- }
- public Set<? super Number> process(Set<Integer> s1 ,Set<String> s2 ,Integer n){
- Object o=new Object();
- return (Set<? super Number>) o;
- }
- Set<? super Number> process(Set<String> set2, Set<Integer> set1, Object object) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
- public static <T> String buildMessage(T a){
- return "hi";
- }
- public B(){
- }
- B(T object) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
- @Override
- public Iterator<Integer> iterator() {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement