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();
  }
コード例 #2
0
ファイル: BankTest.java プロジェクト: pablojorreto/step4
  @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);

  }
コード例 #3
0
 @Override
 public int compareTo(Handler another) {
   return this.toString().compareTo(another.toString());
 }