|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ir.utilities.Weight
public class Weight
A simple wrapper data structure for storing a double weight as an Object that can be put into lists, maps, etc. and then incremented, decremented, and set.
Field Summary | |
---|---|
protected double |
value
A numerical weight value |
Constructor Summary | |
---|---|
Weight()
|
Method Summary | |
---|---|
double |
decrement()
Decrement and return the new count |
double |
decrement(double n)
Decrement by n and return the new count |
double |
decrement(int n)
Decrement by n and return the new count |
double |
getValue()
Get the current count |
double |
increment()
Increment and return the new count |
double |
increment(double n)
Increment by n and return the new count |
double |
increment(int n)
Increment by n and return the new count |
double |
setValue(double value)
Set the current count |
double |
setValue(int value)
Set the current count |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double value
Constructor Detail |
---|
public Weight()
Method Detail |
---|
public double increment()
public double increment(int n)
public double increment(double n)
public double decrement()
public double decrement(int n)
public double decrement(double n)
public double getValue()
public double setValue(int value)
public double setValue(double value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |