Can you write your own generic types in Java ?