Class Constants

java.lang.Object
it.univr.di.labeledvalue.Constants
All Implemented Interfaces:
Serializable

public final class Constants extends Object implements Serializable
Some useful constants for the package.
Version:
$Rev: 840 $
Author:
Roberto Posenato
See Also:
  • Field Details

    • CLOSE_PAIR

      public static final String CLOSE_PAIR
      Char representing labeled-value closing ")".
      See Also:
    • CLOSE_TUPLE

      public static final String CLOSE_TUPLE
      A tuple closing char
      See Also:
    • OPEN_TUPLE

      public static final String OPEN_TUPLE
      A tuple opening char
      See Also:
    • EMPTY_LABEL

      public static final char EMPTY_LABEL
      Char representing empty label: ⊡.
      See Also:
    • EMPTY_LABELstring

      public static final String EMPTY_LABELstring
      See Also:
    • EMPTY_UPPER_CASE_LABEL

      public static final char EMPTY_UPPER_CASE_LABEL
      Char representing empty upper case label: ◇.
      See Also:
    • EMPTY_UPPER_CASE_LABELstring

      public static final String EMPTY_UPPER_CASE_LABELstring
      See Also:
    • INFINITY_SYMBOL

      public static final char INFINITY_SYMBOL
      Char representing infinity symbol: ∞.
      See Also:
    • INFINITY_SYMBOLstring

      public static final String INFINITY_SYMBOLstring
      See Also:
    • NEGATIVE_INFINITY_SYMBOLstring

      public static final String NEGATIVE_INFINITY_SYMBOLstring
      Negative infinitive.
      See Also:
    • CONTINGENCY_SYMBOL

      public static final String CONTINGENCY_SYMBOL
      Char representing the contingency symbol (0x2B0D): ↕︎
    • INT_NULL

      public static final int INT_NULL
      Default value to represent a no valid integer value. It is necessary in the type oriented implementation of Map(Label,int). It has to be different to the value INT_POS_INFINITE, used to represent an edge with a no bound labeled value.
      See Also:
    • INT_NEG_INFINITE

      public static final int INT_NEG_INFINITE
      THe integer value representing the -∞.
      See Also:
    • INT_POS_INFINITE

      public static final int INT_POS_INFINITE
      THe integer value representing the +∞.
      See Also:
    • LabeledValueRE

      public static final String LabeledValueRE
      Regular expression for an acceptable value in a LabeledValue.
      See Also:
    • NonNegIntValueRE

      public static final String NonNegIntValueRE
      Regular expression for an acceptable positive integer.
      See Also:
    • NOT

      public static final char NOT
      Char representing logic not symbol: ¬.
      See Also:
    • NOTstring

      public static final String NOTstring
      See Also:
    • OPEN_PAIR

      public static final String OPEN_PAIR
      String representing labeled-value opening.
      See Also:
    • StrictlyPositiveIntValueRE

      public static final String StrictlyPositiveIntValueRE
      Regular expression for positive and not 0 integer.
      See Also:
    • UNKNOWN

      public static final char UNKNOWN
      Char representing logic not know symbol: ¿.
      See Also:
    • UNKNOWNstring

      public static final String UNKNOWNstring
      See Also:
  • Method Details

    • sumWithOverflowCheck

      public static int sumWithOverflowCheck(int a, int b) throws ArithmeticException
      Determines the sum of a and b. If any of them is already INFINITY, returns INFINITY.
      Parameters:
      a - the first addendum
      b - the second addendum
      Returns:
      the controlled sum
      Throws:
      ArithmeticException - if any.
      ArithmeticException - if any.
      ArithmeticException - if any.
    • formatInt

      public static String formatInt(int n)
      Parameters:
      n - the integer to format
      Returns:
      the value of n as a String using INFINITY_SYMBOL for the infinitive and NaN for not valid integer