Generics

package com.qbw.gen;
public interface Stuff<T,K> {
K getData();
void putData(T stuff);
}
package com.qbw.gen;
public class IntStuff implements Stuff<Integer,String> {
private Integer stuff;
public String getData() {
return stuff.toString();
}
public void putData(final Integer stuff) {
this.stuff = stuff;
}
}
package com.qbw.gen;
public class StringStuff implements Stuff<String,String> {
private String stuff;
public String getData() {
return stuff;
}
public void putData(final String stuff) {
this.stuff = stuff;
}
}