Kniffel/domain/sheets/Category.java

53 lines
960 B
Java
Raw Normal View History

package domain.sheets;
public class Category {
int amount = 0;
int value = 0;
boolean crossed = false;
public int calcValueFromAmount(){
return amount;
}
//? Amount
public int getAmount() {
return amount;
}
public Category setAmount(int amount) {
this.amount = amount;
this.value = calcValueFromAmount();
return this;
}
public void addAmount(){
setAmount(this.amount + 1);
}
//? Value
public int getValue() {
return value;
}
public Category setValue(int value) {
this.value = value;
return this;
}
//? Crossed
public boolean getCrossed() {
return crossed;
}
public Category setCrossed(boolean crossed) {
this.crossed = crossed;
return this;
}
@Override
public String toString() {
return String.format("%s", this.getClass().getSimpleName());
}
}