public enum WeightFactor extends java.lang.Enum<WeightFactor>
If needed, add new levels in front of the LAST
level, as vars set to this level need to be cleaned
last. The assigned values MUST be consecutive, in ascending order because they are used as array indices.
The value of LAST
must be reassigned so it is the maximum value of all previous enum constants.
Enum Constant and Description |
---|
FIRST
Objects with this weight will always be processed first.
|
LAST
Objects with this weight will always be processed last.
|
LEVEL_1 |
LEVEL_10 |
LEVEL_2 |
LEVEL_3 |
LEVEL_4 |
LEVEL_5 |
LEVEL_6 |
LEVEL_7 |
LEVEL_8 |
LEVEL_9 |
NO_DEPENDENCY
Objects with this weight have no direct dependency.
|
Modifier and Type | Field and Description |
---|---|
private int |
value
The integer value of this literal constant.
|
static int |
WEIGHTS_ARRAY_SIZE
The size of an array which can hold finalizables of each weight.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Get the index when storing finalizables in an array, persorted.
|
int |
getValue()
Obtain the value this enum constant represents.
|
static WeightFactor |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static WeightFactor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WeightFactor NO_DEPENDENCY
Note: why are they sorted first?
public static final WeightFactor FIRST
public static final WeightFactor LEVEL_1
public static final WeightFactor LEVEL_2
public static final WeightFactor LEVEL_3
public static final WeightFactor LEVEL_4
public static final WeightFactor LEVEL_5
public static final WeightFactor LEVEL_6
public static final WeightFactor LEVEL_7
public static final WeightFactor LEVEL_8
public static final WeightFactor LEVEL_9
public static final WeightFactor LEVEL_10
public static final WeightFactor LAST
public static final int WEIGHTS_ARRAY_SIZE
private final int value
getValue()
accessor is specified.public static WeightFactor[] values()
for (WeightFactor c : WeightFactor.values()) System.out.println(c);
public static WeightFactor valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getValue()
public int getIndex()