public class AttributesMeaningsDescriptions
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
EVALUATIONS_DIFFERENCE |
Possible description of the meaning of an attribute from memory container, used when attribute's values are
differences of evaluations.
|
static java.lang.String |
evaluationsDifferencePredicate |
Textual form of
EVALUATIONS_DIFFERENCE constant used by convertDescriptionToString method |
static int |
OTHER |
Possible description of the meaning of an attribute from memory container, used when no other description is possible.
Can be used only for: a) not active attributes and criteria, b) description attributes and criteria, c) active condition attributes and criteria, for which type of initial value is not SimpleField nor PairField nor SimilarityField ,d) active decision attributes and criteria, for which type of initial value is not SimpleField nor PairField . |
static int |
PAIR_OF_VALUES |
Possible description of the meaning of an attribute from memory container, used when attribute's values are
pairs of simple field values.
|
static java.lang.String |
pairOfValuesPredicate |
Textual form of
PAIR_OF_VALUES constant used by convertDescriptionToString method |
static int |
PREFERENCE_INTENSITY_DEGREE |
Possible description of the meaning of an attribute from memory container, used when attribute's values are
degrees of the intensity of preference.
|
static java.lang.String |
preferenceIntensityDegreePredicate |
Textual form of
PREFERENCE_INTENSITY_DEGREE constant used by convertDescriptionToString method |
static int |
SIMILARITY |
Possible description of the meaning of an attribute from memory container, used when attribute's values are
similarities between two evaluations.
|
static java.lang.String |
similarityPredicate |
Textual form of
SIMILARITY constant used by convertDescriptionToString method |
static int |
SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES |
Possible description of the meaning of an attribute from memory container, used when attribute's values are
sums of x minimal degrees of the intensity of preference.
|
static int |
SUM_OF_MIN_VALUES |
Possible description of the meaning of an attribute from memory container, used when attribute's values are
sums of x minimal values.
|
static java.lang.String |
sumOfMinPreferenceIntensityDegreesPredicate |
Textual form of
SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES constant used by convertDescriptionToString method |
static java.lang.String |
sumOfMinValuesPredicate |
Textual form of
SUM_OF_MIN_VALUES constant used by convertDescriptionToString method |
static int |
VALUE |
Possible description of the meaning of an attribute from memory container,
used when attribute is "regular" one - comes from information table containing evaluations defined
in Pareto evaluation space.
|
static java.lang.String |
valuePredicate |
Textual form of
VALUE constant used by convertDescriptionToString method |
Constructor | Description |
---|---|
AttributesMeaningsDescriptions(int quantityOfAttributes) |
Constructor for
AttributesMeaningsDescriptions class, which only prepares storage for
quantityOfAttributes descriptions. |
AttributesMeaningsDescriptions(int[] attributesMeaningsDescriptions) |
Constructor for
AttributesMeaningsDescriptions class, which can be used to set the descriptions of the meanings
of all attributes from memory container at once. |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
convertDescriptionToString(int description) |
Converts given description of the meaning of some attribute from memory container to textual form.
|
static boolean |
descriptionValid(int description) |
Validates given attribute's meaning description by checking if it's equal to one of the public constants defined
in this class.
|
static boolean |
descriptionValidForAttribute(int description,
Attribute attribute) |
Checks if given attribute's meaning description is valid for given attribute.
|
static boolean |
descriptionValidForLorenzAttribute(int description) |
Checks if given description is valid for an attribute belonging to Lorenz evaluation space (active cardinal gain criterion)
|
int[] |
getAllAttributesMeaningsDescriptions() |
Gets array with all attributes' meanings descriptions stored in this class.
|
int |
getAttributeMeaningDescription(int attributeNumber) |
Gets description of the meaning of the attribute from memory container which has given number
|
static int |
getAttributeMeaningDescription(Attribute attribute,
int memoryContainerType,
int evaluationSpaceUsed) |
Gets description of the meaning of given attribute, for given type of memory container
(
MemoryContainerDescription.INFORMATION_TABLE , MemoryContainerDescription.PCT or MemoryContainerDescription.SIMILARITY_TABLE )
and for given evaluation space (MemoryContainerDescription.PARETO or MemoryContainerDescription.LORENZ ) |
static int |
getAttributeMeaningDescription(Attribute attribute,
java.lang.String predicate) |
Gets meaning of given attribute, using given predicate (meaning in textual form).
|
static int |
getDescriptionOfOtherAttributes() |
Gets attribute's meaning description used for attributes which don't have any special meaning.
|
static int |
getDescriptionOfPairAttributes() |
Gets attribute's meaning description used for attributes, for which type of initial value is
PairField . |
static int |
getDescriptionOfRegularAttributes() |
Gets attribute's meaning description used for "regular" attributes (for example attributes that come from
information table containing evaluations defined in Pareto evaluation space or decision attibutes).
|
static int |
getDescriptionOfSimilarityAttributes() |
Gets attribute's meaning description used for attributes, for which type of initial value is
SimilarityField . |
int |
getQuantityOfDescriptions() |
Gets quantity of attributes' meanings descriptions stored in this class
|
void |
setAllAttributesMeaningsDescriptions(int[] attributesMeaningsDescriptions) |
Sets all attributes' meanings descriptions at once.
|
void |
setAttributeMeaningDescription(int attributeNumber,
int attributeMeaningDescription) |
Inserts given description of the attribute's meaning at given position.
|
public static final int VALUE
SimpleField
.public static final int SUM_OF_MIN_VALUES
public static final int PREFERENCE_INTENSITY_DEGREE
public static final int EVALUATIONS_DIFFERENCE
public static final int SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
public static final int PAIR_OF_VALUES
PairField
.public static final int SIMILARITY
SimilarityField
.public static final int OTHER
SimpleField
nor PairField
nor SimilarityField
,SimpleField
nor PairField
.public static java.lang.String valuePredicate
VALUE
constant used by convertDescriptionToString
methodpublic static java.lang.String sumOfMinValuesPredicate
SUM_OF_MIN_VALUES
constant used by convertDescriptionToString
methodpublic static java.lang.String preferenceIntensityDegreePredicate
PREFERENCE_INTENSITY_DEGREE
constant used by convertDescriptionToString
methodpublic static java.lang.String evaluationsDifferencePredicate
EVALUATIONS_DIFFERENCE
constant used by convertDescriptionToString
methodpublic static java.lang.String sumOfMinPreferenceIntensityDegreesPredicate
SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
constant used by convertDescriptionToString
methodpublic static java.lang.String pairOfValuesPredicate
PAIR_OF_VALUES
constant used by convertDescriptionToString
methodpublic static java.lang.String similarityPredicate
SIMILARITY
constant used by convertDescriptionToString
methodpublic AttributesMeaningsDescriptions(int[] attributesMeaningsDescriptions)
AttributesMeaningsDescriptions
class, which can be used to set the descriptions of the meanings
of all attributes from memory container at once. It is checked if each description is valid - is equal to
VALUE
, SUM_OF_MIN_VALUES
, PREFERENCE_INTENSITY_DEGREE
,
EVALUATIONS_DIFFERENCE
, SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
, PAIR_OF_VALUES
,
SIMILARITY
or OTHER
.
Each description from given array is copied separately to prevent unwanted modifications from outside this class.attributesMeaningsDescriptions
- array with descriptions of the meanings of all attributes
from memory containerjava.lang.NullPointerException
- when array with descriptions of the meanings of all attributes
from memory container is null
InvalidValueException
- when array with descriptions of the meanings of all attributes from memory container is empty
or when any of the descriptions is invalidpublic AttributesMeaningsDescriptions(int quantityOfAttributes)
AttributesMeaningsDescriptions
class, which only prepares storage for
quantityOfAttributes
descriptions. Descriptions may be added later by means of
insertAttributeMeaningDescription
method.quantityOfAttributes
- quantity of attributes in memory container and thus quantity of descriptions
wich can be stored in this classInvalidValueException
- when quantity of attributes is less than or equal to zeropublic void setAttributeMeaningDescription(int attributeNumber, int attributeMeaningDescription)
VALUE
, SUM_OF_MIN_VALUES
, PREFERENCE_INTENSITY_DEGREE
,
EVALUATIONS_DIFFERENCE
, SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
,
PAIR_OF_VALUES
, SIMILARITY
or OTHER
.attributeNumber
- number of the attribute in memory container for which description should be insertedattributeMeaningDescription
- description of the meaning of the attribute from memory container
which has given numberjava.lang.IndexOutOfBoundsException
- when attribute's number is less than zero or is too bigInvalidValueException
- when description of the meaning of attribute is invalidpublic int getAttributeMeaningDescription(int attributeNumber)
attributeNumber
- number of the attribute in memory container for which description should be getjava.lang.IndexOutOfBoundsException
- when attribute's number is less than zero or is too bigInvalidValueException
- when description for required attribute has not been set yetpublic int[] getAllAttributesMeaningsDescriptions()
public void setAllAttributesMeaningsDescriptions(int[] attributesMeaningsDescriptions)
VALUE
, SUM_OF_MIN_VALUES
, PREFERENCE_INTENSITY_DEGREE
,
EVALUATIONS_DIFFERENCE
, SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
, PAIR_OF_VALUES
, SIMILARITY
or OTHER
.
Each description from given array is copied separately to prevent unwanted modifications from outside this class.attributesMeaningsDescriptions
- array with attributes' meanings descriptions,
which should be set in this classjava.lang.NullPointerException
- when array with all attributes' meanings descriptions is nullInvalidValueException
- when quantity of attributes' meanings descriptions is different than
expected (set in constructor)public int getQuantityOfDescriptions()
public static boolean descriptionValid(int description)
VALUE
, SUM_OF_MIN_VALUES
,
PREFERENCE_INTENSITY_DEGREE
, EVALUATIONS_DIFFERENCE
,
SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
, PAIR_OF_VALUES
, SIMILARITY
and OTHER
.description
- description of the meaning of some attribute from memory containertrue
if given description is valid, false
otherwisepublic static boolean descriptionValidForAttribute(int description, Attribute attribute)
description
- attribute's meaning description for given attributeattribute
- attribute whose description should be validatedtrue
if attribute's meaning description is valid for given attribute, false
otherwiseInvalidValueException
- when description of the meaning of attribute is invalid at all (not only for given attribute)public static boolean descriptionValidForLorenzAttribute(int description)
description
- attribute's meaning description to be checkedtrue
if given description is valid for an attribute belonging to Lorenz evaluation space
false
otherwisepublic static int getDescriptionOfRegularAttributes()
VALUE
.public static int getDescriptionOfPairAttributes()
PairField
.
Returns PAIR_OF_VALUES
.PairField
public static int getDescriptionOfSimilarityAttributes()
SimilarityField
.
Returns SIMILARITY
.SimilarityField
public static int getDescriptionOfOtherAttributes()
OTHER
.public static java.lang.String convertDescriptionToString(int description)
valuePredicate
, sumOfMinValuesPredicate
,
preferenceIntensityDegreePredicate
, evaluationsDifferencePredicate
,
sumOfMinPreferenceIntensityDegreesPredicate
, pairOfValuesPredicate
or similarityPredicate
strings.description
- description of the meaning of some attribute from memory container which should be converted
to textual formInvalidValueException
- when description of the meaning of an attribute is invalid
or when description of the meaning of an attribute is equal to OTHER
public static int getAttributeMeaningDescription(Attribute attribute, int memoryContainerType, int evaluationSpaceUsed)
MemoryContainerDescription.INFORMATION_TABLE
, MemoryContainerDescription.PCT
or MemoryContainerDescription.SIMILARITY_TABLE
)
and for given evaluation space (MemoryContainerDescription.PARETO
or MemoryContainerDescription.LORENZ
)attribute
- attribute for which description of the meaning should be obtainedmemoryContainerType
- type of used memory container.
Can be either MemoryContainerDescription.INFORMATION_TABLE
, MemoryContainerDescription.PCT
or MemoryContainerDescription.SIMILARITY_TABLE
.evaluationSpaceUsed
- used evaluation space.
Can be either MemoryContainerDescription.PARETO
or MemoryContainerDescription.LORENZ
.InvalidValueException
- when memory container type is none of MemoryContainerDescription.INFORMATION_TABLE
, MemoryContainerDescription.PCT
and MemoryContainerDescription.SIMILARITY_TABLE
,
when evaluation space used is none of MemoryContainerDescription.PARETO
and MemoryContainerDescription.LORENZ
or when given attribute is unexpected for given memory container type and/or evaluation spacepublic static int getAttributeMeaningDescription(Attribute attribute, java.lang.String predicate)
convertDescriptionToString
method.
For any valid int
meaning of an attribute attributeMeaningDescription
, different than OTHER
,
we have:getAttributeMeaningDescription(attribute, convertDescriptionToString(attributeMeaningDescription)) == attributeMeaningDescription
.predicate
is equal to an empty string ("") or to null
,
then only properties of given attribute
are used to calculate the meaning.
In such situation it is checked if VALUE
, PAIR_OF_VALUES
or SIMILARITY
meaning is valid
for given attribute. If these meanings are not valid, then an exception is thrown.predicate
is compatible with properties of given attribute
.attribute
- attribute for which meaning description should be obtainedpredicate
- textual form of the meaning of given attribute, for which int
meaning should be returned.
If predicate is an empty string ("") or null
, then only properties of given attribute
are used to calculate its meaning.
In such a situation it is checked if the meaning can be VALUE
, PAIR_OF_VALUES
or SIMILARITY
.java.lang.NullPointerException
- when attribute
is null
InvalidValueException
- when given predicate
is incorrect (cannot be matched with any possible meaning of an attribute, with an empty string and is not null
),
when given predicate is an empty string or null
and given attribute is not "regular" one nor stores pairs of values nor stores similarities,
or when given predicate
is not compatible with given attribute