Adapter Pattern in Java