java generic type extends two interfaces