Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rogue-savage-rats/src/mightypork/utils/objects/Mutable.java

53 lines
538 B

package mightypork.utils.objects;
/**
* Mutable object
*
* @author MightyPork
* @param <T> type
*/
public class Mutable<T> {
/** The wrapped value */
public T o = null;
/**
* Implicint constructor
*/
public Mutable() {}
/**
* new mutable object
*
* @param o value
*/
public Mutable(T o) {
this.o = o;
}
/**
* Get the wrapped value
*
* @return value
*/
public T get()
{
return o;
}
/**
* Set value
*
* @param o new value to set
*/
public void set(T o)
{
this.o = o;
}
}