package inn.ocsf.bee.freigeld.core.model;

import java.util.UUID;

public class CoinDescr implements Coin {

    CoinValue value;

    int era;

    public CoinDescr(CoinValue value, int era) {
        this.value = value;
        this.era = era;
    }

    public CoinDescr() {
    }

    @Override
    public UUID getId() {
        return null;
    }

    @Override
    public CoinValue getValue() {
        return value;
    }

    public void setValue(CoinValue value) {
        this.value = value;
    }

    @Override
    public int getEra() {
        return era;
    }

    public void setEra(int era) {
        this.era = era;
    }

    @Override
    public void incEra() {
        this.era = Long.valueOf(Math.min(CoinValue.MAX_ERA, this.era + 1)).intValue();
    }
}
