1package com.runehive.util;
3import java.util.concurrent.atomic.AtomicInteger;
16public final class MutableNumber extends Number implements Comparable<MutableNumber> {
47 return Integer.toString(
value);
52 return Integer.hashCode(
value);
94 return (
double)
value;
int getAndDecrement(int amount, int minimum)
Returns the value within this counter and then decrements it by amount to a minimum of minimum.
int getAndDecrement(int amount)
Returns the value within this counter and then decrements it by amount.
int value
The value present within this counter.
int incrementAndGet(int amount, int maximum)
Increments the value within this counter by amount to a maximum of maximum and then returns it.
int getAndDecrement()
Returns the value within this counter and then decrements it by an amount of 1.
int getAndIncrement(int amount, int maximum)
Returns the value within this counter and then increments it by amount to a maximum of maximum.
MutableNumber increment()
Increments the value within this counter by 1 and then returns it.
int incrementAndGet()
Increments the value within this counter by 1 and then returns it.
int getAndIncrement(int amount)
Returns the value within this counter and then increments it by amount.
int compareTo(MutableNumber o)
int decrementAndGet(int amount, int minimum)
Decrements the value within this counter by amount to a minimum of minimum and then returns it.
int decrementAndGet(int amount)
Decrements the value within this counter by amount and then returns it.
static final long serialVersionUID
The constant serial version UID for serialization.
MutableNumber(int value)
Creates a new MutableNumber with value.
boolean equals(Object obj)
int incrementAndGet(int amount)
Increments the value within this counter by amount and then returns it.
int getAndIncrement()
Returns the value within this counter and then increments it by an amount of 1.
int decrementAndGet()
Decrements the value within this counter by 1 and then returns it.
MutableNumber()
Creates a new MutableNumber with a value of 0.