code: public TransactionOutput addOutput(TransactionOutput to) {
          unCache();
          to.setParent(this);
          outputs.add(to);
          adjustLength(outputs.size(), to.length);
          return to;
      }
docs: Adds the given output to this transaction. The output must be completely initialized. Returns the given output.