Generic Interface Example in Java