Package it.univr.di.labeledvalue
Class Constants
java.lang.Object
it.univr.di.labeledvalue.Constants
- All Implemented Interfaces:
Serializable
Some useful constants for the package.
- Version:
- $Rev: 993 $
- Author:
- Roberto Posenato
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringChar representing labeled-value closing ")".static final StringA tuple closing charstatic final StringChar representing the contingency symbol (0x2B0D): ↕︎static final charChar representing empty label: ⊡.static final Stringstatic final charChar representing empty upper case label: ◇.static final Stringstatic final charChar representing infinity symbol: ∞.static final Stringstatic final intThe integer value representing the -∞.static final intDefault value to represent an invalid integer value.static final intThe integer value representing the +∞.static final StringRegular expression for an acceptable value in a LabeledValue.static final StringNegative infinitive.static final StringRegular expression for an acceptable positive integer.static final charChar representing the logic 'not' symbol: ¬.static final Stringstatic final StringString representing labeled-value opening.static final StringA tuple opening charstatic final StringRegular expression for a positive and non-zero integer.static final charChar representing the logic 'not know' symbol: ¿.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatInt(int n) static intsumWithOverflowCheck(int a, int b) Determines the sum ofaandb.
-
Field Details
-
CLOSE_PAIR
Char representing labeled-value closing ")".- See Also:
-
CLOSE_TUPLE
A tuple closing char- See Also:
-
CONTINGENCY_SYMBOL
Char representing the contingency symbol (0x2B0D): ↕︎ -
EMPTY_LABEL
public static final char EMPTY_LABELChar representing empty label: ⊡.- See Also:
-
EMPTY_LABELstring
- See Also:
-
EMPTY_UPPER_CASE_LABEL
public static final char EMPTY_UPPER_CASE_LABELChar representing empty upper case label: ◇.- See Also:
-
EMPTY_UPPER_CASE_LABELstring
- See Also:
-
INFINITY_SYMBOL
public static final char INFINITY_SYMBOLChar representing infinity symbol: ∞.- See Also:
-
INFINITY_SYMBOLstring
- See Also:
-
NEGATIVE_INFINITY_SYMBOLstring
Negative infinitive.- See Also:
-
INT_NULL
public static final int INT_NULLDefault value to represent an invalid integer value. It is necessary in the type-oriented implementation ofMap(Label, int). It has to be different from the valueINT_POS_INFINITE, used to represent an edge with a no-bound labeled value.- See Also:
-
INT_NEG_INFINITE
public static final int INT_NEG_INFINITEThe integer value representing the -∞.- See Also:
-
INT_POS_INFINITE
public static final int INT_POS_INFINITEThe integer value representing the +∞.- See Also:
-
LabeledValueRE
Regular expression for an acceptable value in a LabeledValue.- See Also:
-
NOT
public static final char NOTChar representing the logic 'not' symbol: ¬.- See Also:
-
NOTstring
- See Also:
-
NonNegIntValueRE
Regular expression for an acceptable positive integer.- See Also:
-
OPEN_PAIR
String representing labeled-value opening.- See Also:
-
OPEN_TUPLE
A tuple opening char- See Also:
-
StrictlyPositiveIntValueRE
Regular expression for a positive and non-zero integer.- See Also:
-
UNKNOWN
public static final char UNKNOWNChar representing the logic 'not know' symbol: ¿.- See Also:
-
UNKNOWNstring
- See Also:
-
-
Method Details
-
formatInt
- Parameters:
n- the integer to format- Returns:
- the value of
nas a String usingINFINITY_SYMBOLfor the infinitive andNaNfor a not assigned value (similar to null for the object).
-
sumWithOverflowCheck
Determines the sum ofaandb. If any of them is already INFINITY, returns INFINITY.- Parameters:
a- the first addendumb- the second addendum- Returns:
- the controlled sum
- Throws:
ArithmeticException- if 'a' or 'b' areINT_NULL, or there is a situation likeINT_NEG_INFINITE+INT_POS_INFINITE
-