public class Settings
extends java.lang.Object
Singleton
pattern.Modifier and Type | Field | Description |
---|---|---|
static int |
ANY_FAMILY_OF_CRITERIA |
Constant denoting any family of criteria.
|
static int |
CONSISTENT_FAMILY_OF_CRITERIA |
Constant denoting that the family of criteria is considered to be consistent in the sense of Roy.
|
static int |
DEFAULT_PRECISION |
Default precision for floating-point numbers printed in textual form.
|
static int |
DEFAULT_TYPE_OF_FAMILY_OF_CRITERIA |
Default type of family of criteria.
|
int |
precision |
Number of desired decimal places for floating-point numbers printed in textual form.
|
Modifier and Type | Method | Description |
---|---|---|
static Settings |
getInstance() |
Gets the only instance of this class
|
int |
getTypeOfFamilyOfCriteria() |
Gets used type of family of criteria.
|
Settings |
makeSnapshot() |
Makes a snapshot of all current settings
|
void |
restoreFromSnapshot(Settings savedSettings) |
Restores all settings from the given snapshot.
|
void |
setTypeOfFamilyOfCriteria(int typeOfFamilyOfCriteria) |
Sets used type of family of criteria.
|
public static final int DEFAULT_PRECISION
public int precision
public static final int ANY_FAMILY_OF_CRITERIA
public static final int CONSISTENT_FAMILY_OF_CRITERIA
public static final int DEFAULT_TYPE_OF_FAMILY_OF_CRITERIA
ANY_FAMILY_OF_CRITERIA
or CONSISTENT_FAMILY_OF_CRITERIA
.
Set to ANY_FAMILY_OF_CRITERIA
;public int getTypeOfFamilyOfCriteria()
ANY_FAMILY_OF_CRITERIA
or CONSISTENT_FAMILY_OF_CRITERIA
.public void setTypeOfFamilyOfCriteria(int typeOfFamilyOfCriteria)
typeOfFamilyOfCriteria
- type of family of criteria to be usedInvalidValueException
- when given type of family of criteria is neither ANY_FAMILY_OF_CRITERIA
nor CONSISTENT_FAMILY_OF_CRITERIA
public Settings makeSnapshot()
public void restoreFromSnapshot(Settings savedSettings)
savedSettings
- a snapshot of settingsjava.lang.NullPointerException
- when given snapshot of settings is null
public static Settings getInstance()