|
RuneHive-Game
|
The container class that contains functions to simplify the modification of a number. More...
Public Member Functions | |
| int | compareTo (MutableNumber o) |
| int | decrementAndGet () |
Decrements the value within this counter by 1 and then returns it. | |
| int | decrementAndGet (int amount) |
Decrements the value within this counter by amount and then returns it. | |
| int | decrementAndGet (int amount, int minimum) |
Decrements the value within this counter by amount to a minimum of minimum and then returns it. | |
| double | doubleValue () |
| boolean | equals (Object obj) |
| float | floatValue () |
| int | get () |
| Gets the value present within this counter. | |
| int | getAndDecrement () |
Returns the value within this counter and then decrements it by an amount of 1. | |
| int | getAndDecrement (int amount) |
Returns the value within this counter and then decrements it by amount. | |
| int | getAndDecrement (int amount, int minimum) |
Returns the value within this counter and then decrements it by amount to a minimum of minimum. | |
| int | getAndIncrement () |
Returns the value within this counter and then increments it by an amount of 1. | |
| int | getAndIncrement (int amount) |
Returns the value within this counter and then increments it by amount. | |
| int | getAndIncrement (int amount, int maximum) |
Returns the value within this counter and then increments it by amount to a maximum of maximum. | |
| int | hashCode () |
| 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 | incrementAndGet (int amount) |
Increments the value within this counter by amount and then returns it. | |
| int | incrementAndGet (int amount, int maximum) |
Increments the value within this counter by amount to a maximum of maximum and then returns it. | |
| int | intValue () |
| long | longValue () |
| MutableNumber () | |
Creates a new MutableNumber with a value of 0. | |
| MutableNumber (int value) | |
Creates a new MutableNumber with value. | |
| void | set (int value) |
Sets the value within this container to rarity. | |
| String | toString () |
Private Attributes | |
| int | value |
| The value present within this counter. | |
Static Private Attributes | |
| static final long | serialVersionUID = -7475363158492415879L |
| The constant serial version UID for serialization. | |
The container class that contains functions to simplify the modification of a number.
This class is similar in functionality to AtomicInteger but does not support atomic operations, and therefore should not be used across multiple threads.
Definition at line 16 of file MutableNumber.java.
| com.runehive.util.MutableNumber.MutableNumber | ( | int | value | ) |
Creates a new MutableNumber with value.
| value | the value present within this counter. |
Definition at line 34 of file MutableNumber.java.
References value.
Referenced by compareTo(), equals(), and increment().
| com.runehive.util.MutableNumber.MutableNumber | ( | ) |
Creates a new MutableNumber with a value of 0.
Definition at line 41 of file MutableNumber.java.
| int com.runehive.util.MutableNumber.compareTo | ( | MutableNumber | o | ) |
Definition at line 68 of file MutableNumber.java.
References MutableNumber(), and value.
| int com.runehive.util.MutableNumber.decrementAndGet | ( | ) |
Decrements the value within this counter by 1 and then returns it.
Definition at line 262 of file MutableNumber.java.
References decrementAndGet().
Referenced by decrementAndGet(), and decrementAndGet().
| int com.runehive.util.MutableNumber.decrementAndGet | ( | int | amount | ) |
Decrements the value within this counter by amount and then returns it.
| amount | the amount to decrement it by. |
Definition at line 252 of file MutableNumber.java.
References decrementAndGet().
| int com.runehive.util.MutableNumber.decrementAndGet | ( | int | amount, |
| int | minimum ) |
Decrements the value within this counter by amount to a minimum of minimum and then returns it.
| amount | the amount to decrement it by. |
| minimum | the minimum amount it will be decremented to. |
Definition at line 237 of file MutableNumber.java.
References value.
Referenced by com.runehive.game.task.impl.AntiVenomTask.execute(), com.runehive.game.task.impl.SuperAntipoisonTask.execute(), and com.runehive.game.world.entity.combat.effect.impl.CombatAntifireEffect.process().
| double com.runehive.util.MutableNumber.doubleValue | ( | ) |
Definition at line 93 of file MutableNumber.java.
References value.
| boolean com.runehive.util.MutableNumber.equals | ( | Object | obj | ) |
Definition at line 56 of file MutableNumber.java.
References MutableNumber(), and value.
| float com.runehive.util.MutableNumber.floatValue | ( | ) |
Definition at line 88 of file MutableNumber.java.
References value.
| int com.runehive.util.MutableNumber.get | ( | ) |
Gets the value present within this counter.
This function equates to the inherited MutableNumber#intValue() function.
Definition at line 272 of file MutableNumber.java.
References value.
Referenced by com.runehive.game.world.entity.combat.effect.impl.CombatPoisonEffect.apply(), com.runehive.game.world.entity.combat.effect.impl.CombatVenomEffect.apply(), com.runehive.net.packet.out.SendSpecialAmount.encode(), com.runehive.content.consume.PotionData.onAntiPoisonEffect(), and com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonTask().
| int com.runehive.util.MutableNumber.getAndDecrement | ( | ) |
Returns the value within this counter and then decrements it by an amount of 1.
Definition at line 223 of file MutableNumber.java.
References getAndDecrement().
Referenced by getAndDecrement(), and getAndDecrement().
| int com.runehive.util.MutableNumber.getAndDecrement | ( | int | amount | ) |
Returns the value within this counter and then decrements it by amount.
| amount | the amount to decrement it by. |
Definition at line 213 of file MutableNumber.java.
References getAndDecrement().
| int com.runehive.util.MutableNumber.getAndDecrement | ( | int | amount, |
| int | minimum ) |
Returns the value within this counter and then decrements it by amount to a minimum of minimum.
| amount | the amount to decrement it by. |
| minimum | the minimum amount it will be decremented to. |
Definition at line 197 of file MutableNumber.java.
References value.
| int com.runehive.util.MutableNumber.getAndIncrement | ( | ) |
Returns the value within this counter and then increments it by an amount of 1.
Definition at line 133 of file MutableNumber.java.
References getAndIncrement().
Referenced by getAndIncrement(), and getAndIncrement().
| int com.runehive.util.MutableNumber.getAndIncrement | ( | int | amount | ) |
Returns the value within this counter and then increments it by amount.
| amount | the amount to append it by. |
Definition at line 123 of file MutableNumber.java.
References getAndIncrement().
| int com.runehive.util.MutableNumber.getAndIncrement | ( | int | amount, |
| int | maximum ) |
Returns the value within this counter and then increments it by amount to a maximum of maximum.
| amount | the amount to append it by. |
| maximum | the maximum amount it will be incremented to. |
Definition at line 107 of file MutableNumber.java.
References value.
| int com.runehive.util.MutableNumber.hashCode | ( | ) |
Definition at line 51 of file MutableNumber.java.
References value.
| MutableNumber com.runehive.util.MutableNumber.increment | ( | ) |
Increments the value within this counter by 1 and then returns it.
Definition at line 182 of file MutableNumber.java.
References incrementAndGet(), and MutableNumber().
| int com.runehive.util.MutableNumber.incrementAndGet | ( | ) |
Increments the value within this counter by 1 and then returns it.
Definition at line 172 of file MutableNumber.java.
References incrementAndGet().
Referenced by increment(), incrementAndGet(), and incrementAndGet().
| int com.runehive.util.MutableNumber.incrementAndGet | ( | int | amount | ) |
Increments the value within this counter by amount and then returns it.
| amount | the amount to append it by. |
Definition at line 162 of file MutableNumber.java.
References incrementAndGet().
| int com.runehive.util.MutableNumber.incrementAndGet | ( | int | amount, |
| int | maximum ) |
Increments the value within this counter by amount to a maximum of maximum and then returns it.
| amount | the amount to append it by. |
| maximum | the maximum amount it will be incremented to. |
Definition at line 147 of file MutableNumber.java.
References value.
Referenced by com.runehive.content.bot.BotUtility.logLoot(), and com.runehive.content.consume.PotionData.onAntiPoisonEffect().
| int com.runehive.util.MutableNumber.intValue | ( | ) |
This function equates to the MutableNumber#get() function.
Definition at line 78 of file MutableNumber.java.
References value.
Referenced by com.runehive.content.bot.botclass.impl.AGSRuneMelee.hit(), com.runehive.content.bot.botclass.impl.PureMelee.hit(), com.runehive.content.bot.botclass.impl.PureRangeMelee.hit(), com.runehive.content.bot.botclass.impl.WelfareRuneMelee.hit(), and com.runehive.content.bot.botclass.impl.ZerkerMelee.hit().
| long com.runehive.util.MutableNumber.longValue | ( | ) |
Definition at line 83 of file MutableNumber.java.
References value.
| void com.runehive.util.MutableNumber.set | ( | int | value | ) |
Sets the value within this container to rarity.
| value | the new value to set. |
Definition at line 282 of file MutableNumber.java.
References value.
Referenced by com.runehive.content.consume.PotionData.onAntiPoisonEffect().
| String com.runehive.util.MutableNumber.toString | ( | ) |
Definition at line 46 of file MutableNumber.java.
References value.
|
staticprivate |
The constant serial version UID for serialization.
Definition at line 21 of file MutableNumber.java.
|
private |
The value present within this counter.
Definition at line 26 of file MutableNumber.java.
Referenced by compareTo(), decrementAndGet(), doubleValue(), equals(), floatValue(), get(), getAndDecrement(), getAndIncrement(), hashCode(), incrementAndGet(), intValue(), longValue(), MutableNumber(), set(), and toString().