Adapter OO design pattern implemented in Java