|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
org.knime.core.util.MutableInteger
public final class MutableInteger
This class is essentially an integer whose value can be changed. The hash code and therefore also the equals change dynamically with the value stored. Be patient not to use this object as a key in a hashtable and such.
Constructor Summary | |
---|---|
MutableInteger(int i)
Creates a new mutable integer. |
Method Summary | |
---|---|
void |
add(int value)
Adds the given value to this mutable integer. |
int |
dec()
Decrements this integer by one. |
double |
doubleValue()
|
boolean |
equals(Object obj)
|
float |
floatValue()
|
int |
hashCode()
|
int |
inc()
Increments this integer by one. |
int |
intValue()
|
long |
longValue()
|
void |
setValue(int newValue)
Sets the value of this integer. |
String |
toString()
|
Methods inherited from class java.lang.Number |
---|
byteValue, shortValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MutableInteger(int i)
i
- the start valueMethod Detail |
---|
public int intValue()
intValue
in class Number
public long longValue()
longValue
in class Number
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public void setValue(int newValue)
newValue
- the new valuepublic int inc()
public void add(int value)
value
- the value to addpublic int dec()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |