Package com.google.common.geometry
Class MutableInteger
- java.lang.Object
-
- com.google.common.geometry.MutableInteger
-
public class MutableInteger extends Object
Like an Integer, but mutable :) Sometimes it is just really convenient to be able to pass a MutableInteger as a parameter to a function, or for synchronization purposes (so that you can guard access to an int value without creating a separate Object just to synchronize on). NOT thread-safe
-
-
Constructor Summary
Constructors Constructor Description MutableInteger(int i)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int amount)voiddecrement()booleanequals(Object o)inthashCode()voidincrement()IntegerintegerValue()intintValue()voidsetValue(int value)voidsubtract(int amount)StringtoString()
-
-
-
Method Detail
-
intValue
public int intValue()
-
integerValue
public Integer integerValue()
-
setValue
public void setValue(int value)
-
increment
public void increment()
-
add
public void add(int amount)
-
decrement
public void decrement()
-
subtract
public void subtract(int amount)
-
-