|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.RandomRange
public class RandomRange
| Field Summary | |
|---|---|
private int |
factor
Factor to multiply the value with. |
private static java.util.logging.Logger |
logger
|
private int |
maximum
Maximum value. |
private int |
minimum
Minimum value. |
private int |
probability
Probability that the result is not zero. |
private java.util.List<Scope> |
scopes
A list of Scopes limiting the applicability of this Feature. |
| Constructor Summary | |
|---|---|
RandomRange()
|
|
RandomRange(int probability,
int minimum,
int maximum,
int factor)
Creates a new RandomRange instance. |
|
RandomRange(javax.xml.stream.XMLStreamReader in)
Creates a new RandomRange instance. |
|
| Method Summary | |
|---|---|
RandomRange |
clone()
|
int |
getAmount(int random)
Describe getAmount method here. |
int |
getAmount(java.lang.String prefix,
java.util.Random random,
boolean continuous)
Gets the amount of plunder. |
int |
getFactor()
Get the Factor value. |
int |
getMaximum()
Get the Maximum value. |
int |
getMinimum()
Get the Minimum value. |
int |
getProbability()
Get the Probability value. |
int |
getRandomLimit()
Describe getRandomLimit method here. |
int |
getRange()
Describe getRange method here. |
java.util.List<Scope> |
getScopes()
Return the scopes of this RandomRange. |
void |
readFromXML(javax.xml.stream.XMLStreamReader in)
|
void |
setFactor(int newFactor)
Set the Factor value. |
void |
setMaximum(int newMaximum)
Set the Maximum value. |
void |
setMinimum(int newMinimum)
Set the Minimum value. |
void |
setProbability(int newProbability)
Set the Probability value. |
void |
toXML(javax.xml.stream.XMLStreamWriter out,
java.lang.String tag)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.util.logging.Logger logger
private int probability
private int minimum
private int maximum
private int factor
private java.util.List<Scope> scopes
| Constructor Detail |
|---|
public RandomRange()
public RandomRange(int probability,
int minimum,
int maximum,
int factor)
RandomRange instance.
probability - an int valueminimum - an int valuemaximum - an int valuefactor - an int value
public RandomRange(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
RandomRange instance.
in - a XMLStreamReader value
javax.xml.stream.XMLStreamException| Method Detail |
|---|
public final int getProbability()
Probability value.
int valuepublic final void setProbability(int newProbability)
Probability value.
newProbability - The new Probability value.public final int getMinimum()
Minimum value.
int valuepublic final void setMinimum(int newMinimum)
Minimum value.
newMinimum - The new Minimum value.public final int getMaximum()
Maximum value.
int valuepublic final void setMaximum(int newMaximum)
Maximum value.
newMaximum - The new Maximum value.public final int getFactor()
Factor value.
int valuepublic final void setFactor(int newFactor)
Factor value.
newFactor - The new Factor value.public int getRange()
getRange method here.
int valuepublic int getRandomLimit()
getRandomLimit method here.
int valuepublic int getAmount(int random)
getAmount method here.
random - an int value
int value
public int getAmount(java.lang.String prefix,
java.util.Random random,
boolean continuous)
prefix - A logger prefix.random - A pseudo-random number source.continuous - Choose a continuous or discrete result.
public java.util.List<Scope> getScopes()
public RandomRange clone()
clone in class java.lang.Object
public void readFromXML(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public void toXML(javax.xml.stream.XMLStreamWriter out,
java.lang.String tag)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||