mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
31 lines
604 B
Java
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);
|
|
}
|
|
}
|