/**
 * Copyright 2011 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.bitcoin.core;

import java.math.BigInteger;
import java.util.List;

/**
 * Convenience implementation of {@link WalletEventListener}.
 */
public abstract class AbstractWalletEventListener implements WalletEventListener {
    /**
     * This is called on a Peer thread when a block is received that sends some coins to you. Note that this will
     * also be called when downloading the block chain as the wallet balance catches up so if you don't want that
     * register the event listener after the chain is downloaded. It's safe to use methods of wallet during the
     * execution of this callback.
     *
     * @param wallet      The wallet object that received the coins/
     * @param tx          The transaction which sent us the coins.
     * @param prevBalance Balance before the coins were received.
     * @param newBalance  Current balance of the wallet.
     */
    @Override
    public void onCoinsReceived(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) {
        onChange();
    }

    /**
     * This is called on a Peer thread when a transaction is seen that sends coins <b>from</b> this wallet, either
     * because it was broadcast across the network or because a block was received. This may at first glance seem
     * useless, because in the common case you already know about such transactions because you created them with
     * the Wallets createSend/sendCoins methods. However when you have a wallet containing only keys, and you wish
     * to replay the block chain to fill it with transactions, it's useful to find out when a transaction is discovered
     * that sends coins from the wallet.<p>
     *
     * It's safe to modify the wallet from inside this callback, but if you're replaying the block chain you should
     * be careful to avoid such modifications. Otherwise your changes may be overridden by new data from the chain.
     *
     * @param wallet       The wallet object that this callback relates to (that sent the coins).
     * @param tx           The transaction that sent the coins to someone else.
     * @param prevBalance  The wallets balance before this transaction was seen.
     * @param newBalance   The wallets balance after this transaction was seen (should be less than prevBalance).
     */
    @Override
    public void onCoinsSent(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) {
        onChange();
    }

    /**
     * This is called on a Peer thread when a block is received that triggers a block chain re-organization.<p>
     *
     * A re-organize means that the consensus (chain) of the network has diverged and now changed from what we
     * believed it was previously. Usually this won't matter because the new consensus will include all our old
     * transactions assuming we are playing by the rules. However it's theoretically possible for our balance to
     * change in arbitrary ways, most likely, we could lose some money we thought we had.<p>
     *
     * It is safe to use methods of wallet whilst inside this callback.
     */
    @Override
    public void onReorganize(Wallet wallet) {
        onChange();
    }

    /**
     * Called on a Peer thread when a transaction changes its confidence level. You can also attach event listeners to
     * the individual transactions, if you don't care about all of them. Usually you would save the wallet to disk after
     * receiving this callback.<p>
     *
     * You should pay attention to this callback in case a transaction becomes <i>dead</i>, that is, somebody
     * successfully executed a double spend against you. This is a (very!) rare situation but the user should be
     * notified that money they thought they had, was taken away from them.<p>
     *
     * @param wallet
     * @param tx
     */
    @Override
    public void onTransactionConfidenceChanged(Wallet wallet, Transaction tx) {
        onChange();
    }

    @Override
    public void onKeysAdded(Wallet wallet, List<ECKey> keys) {
        onChange();
    }

    @Override
    public void onWalletChanged(Wallet wallet) {
        onChange();
    }

    /**
     * Called by the other default method implementations when something (anything) changes in the wallet.
     */
    public void onChange() {
    }
}

@@ -837,3594 +837,392 @@
     
-/**%0A     * This is called on a Peer thread when a block is received that sends some coins to you. Note that this will%0A     * also be called when downloading the block chain as the wallet balance catches up so if you don't want that%0A     * register the event listener after the chain is downloaded. It's safe to use methods of wallet during the%0A     * execution of this callback.%0A     *%0A     * @param wallet      The wallet object that received the coins/%0A     * @param tx          The transaction which sent us the coins.%0A     * @param prevBalance Balance before the coins were received.%0A     * @param newBalance  Current balance of the wallet.%0A     */%0A    @Override%0A    public void onCoinsReceived(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) %7B%0A        onChange();%0A    %7D%0A%0A    /**%0A     * This is called on a Peer thread when a transaction is seen that sends coins %3Cb%3Efrom%3C/b%3E this wallet, either%0A     * because it was broadcast across the network or because a block was received. This may at first glance seem%0A     * useless, because in the common case you already know about such transactions because you created them with%0A     * the Wallets createSend/sendCoins methods. However when you have a wallet containing only keys, and you wish%0A     * to replay the block chain to fill it with transactions, it's useful to find out when a transaction is discovered%0A     * that sends coins from the wallet.%3Cp%3E%0A     *%0A     * It's safe to modify the wallet from inside this callback, but if you're replaying the block chain you should%0A     * be careful to avoid such modifications. Otherwise your changes may be overridden by new data from the chain.%0A     *%0A     * @param wallet       The wallet object that this callback relates to (that sent the coins).%0A     * @param tx           The transaction that sent the coins to someone else.%0A     * @param prevBalance  The wallets balance before this transaction was seen.%0A     * @param newBalance   The wallets balance after this transaction was seen (should be less than prevBalance).%0A     */%0A    @Override%0A    public void onCoinsSent(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) %7B%0A        onChange();%0A    %7D%0A%0A    /**%0A     * This is called on a Peer thread when a block is received that triggers a block chain re-organization.%3Cp%3E%0A     *%0A     * A re-organize means that the consensus (chain) of the network has diverged and now changed from what we%0A     * believed it was previously. Usually this won't matter because the new consensus will include all our old%0A     * transactions assuming we are playing by the rules. However it's theoretically possible for our balance to%0A     * change in arbitrary ways, most likely, we could lose some money we thought we had.%3Cp%3E%0A     *%0A     * It is safe to use methods of wallet whilst inside this callback.%0A     */%0A    @Override%0A    public void onReorganize(Wallet wallet) %7B%0A        onChange();%0A    %7D%0A%0A    /**%0A     * Called on a Peer thread when a transaction changes its confidence level. You can also attach event listeners to%0A     * the individual transactions, if you don't care about all of them. Usually you would save the wallet to disk after%0A     * receiving this callback.%3Cp%3E%0A     *%0A     * You should pay attention to this callback in case a transaction becomes %3Ci%3Edead%3C/i%3E, that is, somebody%0A     * successfully executed a double spend against you. This is a (very!) rare situation but the user should be%0A     * notified that money they thought they had, was taken away from them.%3Cp%3E%0A     *%0A     * @param wallet%0A     * @param tx%0A     */
+@Override%0A    public void onCoinsReceived(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) %7B%0A        onChange();%0A    %7D%0A%0A    @Override%0A    public void onCoinsSent(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) %7B%0A        onChange();%0A    %7D%0A%0A    @Override%0A    public void onReorganize(Wallet wallet) %7B%0A        onChange();%0A    %7D%0A
 %0A   
@@ -1537,131 +1537,8 @@
  %7D%0A%0A
-    /**%0A     * Called by the other default method implementations when something (anything) changes in the wallet.%0A     */%0A
     

Remove JavaDocs from AbstractWalletEventListener so IDEs will automatically inherit them.