Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## INTERFACE
- public interface Cloneable<T> extends java.lang.Cloneable {
- public T clone();
- }
- ## AUFRUF
- public void fill(T obj)
- {
- for(Coord c : this.range)
- {
- if(obj instanceof Cloneable<T>) // GEHT NICHT!
- {
- Cloneable<T> cloneable = (Cloneable<T>)obj;
- obj = (T)cloneable.clone();
- }
- this.put(c, obj);
- }
- }
Add Comment
Please, Sign In to add comment