Skip to content
Snippets Groups Projects
AbstractWallet.java 694 B
Newer Older
Michael Kmoch's avatar
Michael Kmoch committed
package fucoin;

Michael Kmoch's avatar
Michael Kmoch committed
public abstract class AbstractWallet extends AbstractNode{
Michael Kmoch's avatar
Michael Kmoch committed

Michael Kmoch's avatar
Michael Kmoch committed
	// Constructor
	public AbstractWallet(String name) {
		this.name = name;
	}
Michael Kmoch's avatar
Michael Kmoch committed
    
    // Returns the name of this wallet, e.g. "Lieschen Müller"
    public String getName() {
        return this.name;
    }
Michael Kmoch's avatar
Michael Kmoch committed
    // Performs housekeeping operations, e.g. pushes 
    // backedUpNeighbor-entries to other neighbors
    public abstract void leave();
Michael Kmoch's avatar
Michael Kmoch committed
	
    // The amount this wallet currently holds
    protected int amount;
Michael Kmoch's avatar
Michael Kmoch committed
    // The name of this wallet (does never change, no 
    // duplicates in network assumed)
    public final String name;

    public int getAmount(){
        return amount;
    }
Michael Kmoch's avatar
Michael Kmoch committed
}