Adapter design patterns java