fuzzydl.util

## Class Util

- java.lang.Object
- - fuzzydl.util.Util

-     public class Util
      extends java.lang.Object

  Common utilities.
  Author:
    Fernando Bobillo

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Util()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `error(java.lang.String message)` Prints an error message and finishes the execution of the program.
    `static boolean` | `hasIntegerValue(java.lang.Double d)` Checks whether a double number has an integer value or not.
    `static int` | `log2(double n)` Computes the base 2 logarithm of a number.
    `static void` | `order(java.util.ArrayList<Concept> v)` Order a vector of concepts.
    `static void` | `print(java.lang.String message)` Prints on screen a message only in debug mode
    `static void` | `println(java.lang.String message)` Prints on screen a message and a new line only in debug mode
    `static double` | `round(double x)` Rounds a double number to the number of decimals ConfigReader.NUMBER_DIGITS

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Util

          public Util()

  - ### Method Detail

    - #### println

          public static void println(java.lang.String message)

      Prints on screen a message and a new line only in debug mode
      Parameters:
        `message` - Message to be printed.

    - #### print

          public static void print(java.lang.String message)

      Prints on screen a message only in debug mode
      Parameters:
        `message` - Message to be printed.

    - #### error

          public static void error(java.lang.String message)
                            throws FuzzyOntologyException

      Prints an error message and finishes the execution of the program.
      Parameters:
        `message` - Message to display.
      Throws:
        `FuzzyOntologyException` - fuzzy ontology exception.

    - #### hasIntegerValue

          public static boolean hasIntegerValue(java.lang.Double d)

      Checks whether a double number has an integer value or not.
      Parameters:
        `d` - A double number.
      Returns:
        Whether d has an integer value or not.

    - #### round

          public static double round(double x)

      Rounds a double number to the number of decimals ConfigReader.NUMBER_DIGITS
      Parameters:
        `x` - A double number.
      Returns:
        A rounded double number.

    - #### order

          public static void order(java.util.ArrayList<Concept> v)

      Order a vector of concepts.
      Parameters:
        `v` - A vector of concepts.

    - #### log2

          public static int log2(double n)

      Computes the base 2 logarithm of a number.
      Parameters:
        `n` - A real number.
      Returns:
        Smallest integer greater or equal than the base 2 logarithm of a number.