Advertisement
Guest User

Generic subclasses

a guest
Nov 26th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class GenericClass<T>
  2. {
  3. var obj:T;
  4.  
  5. public function new(obj:T)
  6. {
  7. this.obj = obj;
  8. }
  9.  
  10. public function toString():String
  11. {
  12. return Std.string(obj);
  13. }
  14. }
  15.  
  16. class GenericSubclass<T> extends GenericClass<T>
  17. {
  18. public function new(obj:T)
  19. {
  20. super(obj);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement