| 4 | // Visit http://OnJava8.com for more book information. |
| 5 | |
| 6 | class SelfBounded<T extends SelfBounded<T>> { |
| 7 | T element; |
| 8 | SelfBounded<T> set(T arg) { |
| 9 | element = arg; |
| 10 | return this; |
| 11 | } |
| 12 | T get() { return element; } |
| 13 | } |
| 14 | |
| 15 | class A extends SelfBounded<A> {} |
| 16 | class B extends SelfBounded<A> {} // Also OK |
nothing calls this directly
no outgoing calls
no test coverage detected