Package peak.can
Class MutableInteger
- java.lang.Object
-
- peak.can.MutableInteger
-
public class MutableInteger extends java.lang.ObjectThe MutableInteger class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int. This class is used because Java.Lang.Integer objects are defined as Imutable. Yet, we need to maintain object reference when it's passed to the JNI library using. So, we defined a simple Class which extends Java.Lang.Object to resolve the problematic.
-
-
Field Summary
Fields Modifier and Type Field Description intvalue
-
Constructor Summary
Constructors Constructor Description MutableInteger(int value)ConstructorMutableInteger(java.lang.String value)Constructor parsing the string argument as a integer
-
-
-
Method Detail
-
getValue
public int getValue()
Gets integer value- Returns:
- integer value
-
setValue
public void setValue(int value)
Sets integer value- Parameters:
value- Integer value
-
toString
public java.lang.String toString()
Overrides toString() to display int value- Overrides:
toStringin classjava.lang.Object- Returns:
- MutableInteger's value as a string
-
-