mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-07 16:26:14 +00:00
GUI & Tasking utils
This commit is contained in:
36
src/main/java/com/volmit/iris/util/FinalInteger.java
Normal file
36
src/main/java/com/volmit/iris/util/FinalInteger.java
Normal file
@@ -0,0 +1,36 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user