I've used the UK Plug -> US Socket and US Plug -> UK Socket analogy. I've also made it possible for UK plug to use a UK socket and a US plug to use a US socket. The output of the SSCCE below isUKPlug -> UKSocketUSPlug -> USSocketUKPlug -> UKUSAdapter -> USSocketUSPlug -> USUKAdapter -> UKSocketAnd the codepackage com.structural.adapter.adapter2;interface IAdapter {  public void plugin();}class UKUSAdapter implements IAdapter {  UKPlug plug;  USSocket socket;  public UKUSAdapter(UKPlug plug, USSocket socket) {    this.plug = plug;    this.socket = socket;  }  @Override  public void plugin() {    System.out.print(UKUSAdapter -> );    socket.accept_2pin_plug(plug.pin1, plug.pin2);  }}class USUKAdapter implements IAdapter {  USPlug plug;  UKSocket socket;  public USUKAdapter(USPlug plug, UKSocket socket) {    this.plug = plug;     this.socket = socket;  }  @Override  public void plugin() {    System.out.print(USUKAdapter -> );    socket.accept_3pin_plug(plug.pin1, plug.pin2, 1);  }}class USSocket {  USPlug plug;  public USSocket(USPlug plug) {    this.plug = plug;  }  public void accept_2pin_plug(int pin1, int pin2) {    System.out.print(USSocket);  }}class UKSocket {  UKPlug plug;  public UKSocket(UKPlug plug) {    this.plug = plug;  }  public void accept_3pin_plug(int pin1, int pin2, int pin3) {    System.out.print(UKSocket);  }}class UKPlug {     int pin1;  int pin2;  int pin3;  IAdapter adapter;  UKSocket socket;  public UKPlug(int pin1, int pin2, int pin3) {    this.pin1 = pin1;    this.pin2 = pin2;    this.pin3 = pin3;  }  public void plug_into_3pin() {    System.out.print(UKPlug -> );    if(this.socket == null) {      adapter.plugin();     } else {     socket.accept_3pin_plug(pin1, pin2, pin3);     }      }  public void setAdapter(IAdapter adapter) {    this.adapter = adapter;    this.socket = null;      }  public void setSocket(UKSocket socket) {    this.socket = socket;    this.adapter = null;  }}class USPlug {     int pin1;  int pin2;  IAdapter adapter;  USSocket socket;  public USPlug(int pin1, int pin2) {    this.pin1 = pin1;    this.pin2 = pin2;  }  public void plug_into_2pin() {    System.out.print(USPlug -> );    if(this.socket == null) {      adapter.plugin();     } else {      socket.accept_2pin_plug(pin1, pin2);    }      }  public void setAdapter(IAdapter adapter) {    this.adapter = adapter;    this.socket = null;  }  public void setSocket(USSocket socket) {    this.socket = socket;    this.adapter = null;  }}public class TestPlugAdapters {  public static void main(String[] args) {    UKPlug ukPlug = new UKPlug(1,1,1);    UKSocket ukSocket = new UKSocket(ukPlug);    USPlug usPlug = new USPlug(1,1);    USSocket usSocket = new USSocket(usPlug);    //Test UK Plug to UK Socket    ukPlug.setSocket(ukSocket);    ukPlug.plug_into_3pin();    System.out.println();    //Test US Plug to US Socket    usPlug.setSocket(usSocket);    usPlug.plug_into_2pin();    System.out.println();    //Test UK Plug to US Socket    IAdapter ukusAdapter = new UKUSAdapter(ukPlug, usSocket);    ukPlug.setAdapter(ukusAdapter);    ukPlug.plug_into_3pin();    System.out.println();    //Test US Plug to UK Socket    IAdapter usukAdapter = new USUKAdapter(usPlug, ukSocket);    usPlug.setAdapter(usukAdapter);    usPlug.plug_into_2pin();    System.out.println();  }}
Is this an acceptable implementation of the Adapter pattern?
java;design patterns