Faction.FRange
, java.lang.Comparable<Faction.FRange>
public class DefaultFaction.DefaultFactionRange extends java.lang.Object implements Faction.FRange, java.lang.Comparable<Faction.FRange>
Modifier and Type | Field | Description |
---|---|---|
Faction.Align |
alignEquiv |
|
java.lang.String |
codeName |
|
Faction |
faction |
|
int |
high |
|
int |
low |
|
java.lang.String |
name |
Constructor | Description |
---|---|
DefaultFactionRange(Faction F,
java.lang.String key) |
Modifier and Type | Method | Description |
---|---|---|
Faction.Align |
alignEquiv() |
Returns a constant reflecting whether this range of faction value is
equivalent to one of the legacy alignment constant values.
|
java.lang.String |
codeName() |
Returns the unique code name that describes this range of faction values
|
int |
compareTo(Faction.FRange o) |
|
Faction |
getFaction() |
Returns the faction of which this is a range
|
int |
high() |
Returns the numerically high value of this faction range
|
int |
low() |
Returns the numerically low value of this faction range
|
int |
med() |
Returns the numerically median value of this faction range
|
java.lang.String |
name() |
Returns the nice friendly displayable name of this faction range,
which need not be unique.
|
int |
random() |
Returns a random numeric value within this faction range
|
void |
setAlignEquiv(Faction.Align newVal) |
Sets a constant reflecting whether this range of faction value is
equivalent to one of the legacy alignment constant values.
|
void |
setHigh(int newVal) |
Sets the numerically high value of this faction range
|
void |
setLow(int newVal) |
Sets the numerically low value of this faction range
|
void |
setName(java.lang.String newVal) |
Sets the nice friendly displayable name of this faction range,
which need not be unique.
|
java.lang.String |
toString() |
Returns a semicolon-delimited representation of this faction range, which
can be used to create a new one later.
|
public int low
public int high
public java.lang.String name
public java.lang.String codeName
public Faction.Align alignEquiv
public Faction faction
public DefaultFactionRange(Faction F, java.lang.String key)
public int low()
Faction.FRange
low
in interface Faction.FRange
Faction.FRange.setLow(int)
public int high()
Faction.FRange
high
in interface Faction.FRange
Faction.FRange.setHigh(int)
public java.lang.String name()
Faction.FRange
name
in interface Faction.FRange
Faction.FRange.setName(String)
public java.lang.String codeName()
Faction.FRange
codeName
in interface Faction.FRange
public Faction.Align alignEquiv()
Faction.FRange
alignEquiv
in interface Faction.FRange
Faction.Align
public Faction getFaction()
Faction.FRange
getFaction
in interface Faction.FRange
Faction.addRange(String)
public void setLow(int newVal)
Faction.FRange
setLow
in interface Faction.FRange
newVal
- the numerically low value of this faction rangeFaction.FRange.low()
public void setHigh(int newVal)
Faction.FRange
setHigh
in interface Faction.FRange
newVal
- the numerically high value of this faction rangeFaction.FRange.high()
public void setName(java.lang.String newVal)
Faction.FRange
setName
in interface Faction.FRange
newVal
- the name of this range of valuesFaction.FRange.name()
public void setAlignEquiv(Faction.Align newVal)
Faction.FRange
setAlignEquiv
in interface Faction.FRange
newVal
- a new alignment constantFaction.Align
public java.lang.String toString()
Faction.FRange
toString
in interface Faction.FRange
toString
in class java.lang.Object
Faction.addRange(String)
public int random()
Faction.FRange
random
in interface Faction.FRange
public int med()
Faction.FRange
med
in interface Faction.FRange
public int compareTo(Faction.FRange o)
compareTo
in interface java.lang.Comparable<Faction.FRange>