Class Constants
java.lang.Object
it.univr.di.labeledvalue.Constants
- All Implemented Interfaces:
Serializable
Some useful constants for the package.
- Version:
- $Rev: 889 $
- Author:
- Roberto Posenato
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Char representing labeled-value closing ")".static final String
A tuple closing charstatic final String
Char representing the contingency symbol (0x2B0D): ↕︎static final char
Char representing empty label: ⊡.static final String
static final char
Char representing empty upper case label: ◇.static final String
static final char
Char representing infinity symbol: ∞.static final String
static final int
THe integer value representing the -∞.static final int
Default value to represent a no valid integer value.static final int
THe integer value representing the +∞.static final String
Regular expression for an acceptable value in a LabeledValue.static final String
Negative infinitive.static final String
Regular expression for an acceptable positive integer.static final char
Char representing logic not symbol: ¬.static final String
static final String
String representing labeled-value opening.static final String
A tuple opening charstatic final String
Regular expression for positive and not 0 integer.static final char
Char representing logic not know symbol: ¿.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatInt
(int n) static int
sumWithOverflowCheck
(int a, int b) Determines the sum ofa
andb
.
-
Field Details
-
CLOSE_PAIR
-
CLOSE_TUPLE
-
OPEN_TUPLE
-
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
-
CONTINGENCY_SYMBOL
Char representing the contingency symbol (0x2B0D): ↕︎ -
INT_NULL
public static final int INT_NULLDefault value to represent a no valid integer value. It is necessary in the type oriented implementation ofMap(Label,int)
. It has to be different to 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:
-
NonNegIntValueRE
Regular expression for an acceptable positive integer.- See Also:
-
NOT
public static final char NOTChar representing logic not symbol: ¬.- See Also:
-
NOTstring
- See Also:
-
OPEN_PAIR
-
StrictlyPositiveIntValueRE
Regular expression for positive and not 0 integer.- See Also:
-
UNKNOWN
public static final char UNKNOWNChar representing logic not know symbol: ¿.- See Also:
-
UNKNOWNstring
- See Also:
-
-
Method Details
-
sumWithOverflowCheck
Determines the sum ofa
andb
. If any of them is already INFINITY, returns INFINITY.- Parameters:
a
- the first addendumb
- the second addendum- Returns:
- the controlled sum
- Throws:
ArithmeticException
- if any.ArithmeticException
- if any.ArithmeticException
- if any.
-
formatInt
- Parameters:
n
- the integer to format- Returns:
- the value of
n
as a String usingINFINITY_SYMBOL
for the infinitive andNaN
for a not assigned value (similar to null for the object).
-