Iris/src/main/java/com/volmit/iris/util/FinalInteger.java
2021-07-14 02:34:13 -04:00

31 lines
604 B
Java

package com.volmit.iris.util;
/**
* Represents a number that can be finalized and be changed
*
* @author cyberpwn
*/
public class FinalInteger extends Wrapper<Integer> {
public FinalInteger(Integer t) {
super(t);
}
/**
* Add to this value
*
* @param i the number to add to this value (value = value + i)
*/
public void add(int i) {
set(get() + i);
}
/**
* Subtract from this value
*
* @param i the number to subtract from this value (value = value - i)
*/
public void sub(int i) {
set(get() - i);
}
}