Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. static class Tab<N extends Number> {
  2.     }
  3.  
  4.     static class FooTab<N extends Number> extends Tab<N> {
  5.     }
  6.  
  7.     static class BarTab extends Tab<Double> {
  8.     }
  9.  
  10.     static class Controller<F extends Tab<? extends Number>> {
  11.         void use(F f) {
  12.         }
  13.     }
  14.  
  15.     static {
  16.         new Controller<Tab<Double>>().use(new FooTab<Double>());
  17.         new Controller<Tab<Double>>().use(new BarTab());
  18.     }