public String toString() {
    StringBuilder sb = new StringBuilder("HandlerChainInvoker[\n");

    for (Handler handler : _chain) {
      sb.append(handler.toString());
      sb.append('\n');
    }

    sb.append(']');

    return sb.toString();
  }
Example #2
0
  @Before
  public void setUp() throws MalformedHandlerException {

    bankID = new BankHandler("0022");

    PadreIslaID = new OfficeHandler(0026);
    NocedoID = new OfficeHandler(0024);
    OtroID = new OfficeHandler(0000);

    PadreIsla = new Office();
    Nocedo = new Office();

    Otro = new Office();
    bank = new Bank(bankID.toString());
    // Nocedo.setID(NocedoID);

  }
 @Override
 public int compareTo(Handler another) {
   return this.toString().compareTo(another.toString());
 }