Class PseudoInteger

  • All Implemented Interfaces:
    IVilType

    public class PseudoInteger
    extends PseudoReal
    A pseudo integer type for VIL.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Integer DEFAULT  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PseudoInteger()
      Prevents external instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int add​(int i1, int i2)
      Represents the addition for integers.
      static double convert​(int val)
      Conversion operation.
      static int div​(int i1, int i2)
      Represents the division for integers.
      static double division​(int i1, int i2)
      Represents the division for integers with remainder.
      static boolean equals​(int i1, int i2)
      Represents the equality operation for integers.
      static TypeDescriptor<?> getType​(java.lang.Integer value)
      Returns the type of value.
      static boolean greaterEqualThan​(int i1, int i2)
      Represents the greater-then-equals comparison for integer.
      static boolean greaterThan​(int i1, int i2)
      Represents the greater comparison for integers.
      static int intAbs​(int i0)
      Returns the absolute value of the given integer value.
      static boolean lessEqualThan​(int i1, int i2)
      Represents the less-then-equals comparison for integers.
      static boolean lessThan​(int i1, int i2)
      Represents the less-then comparison for integers.
      static int max​(int i1, int i2)
      Returns the maximum value of i1 and i2.
      static int min​(int i1, int i2)
      Returns the minimum value of i1 and i2.
      static int mod​(int i1, int i2)
      Returns the modulo value of i1 and i2.
      static int multiplication​(int i1, int i2)
      Represents the multiplication for integers.
      static int negates​(int i0)
      Negates the given integer value.
      static int subtract​(int i1, int i2)
      Represents the subtraction for integers.
      static java.lang.String toString​(int i0)
      Returns the string value of i0.
      static boolean unequals​(int i1, int i2)
      Represents the unequality operation for Integers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT

        public static final java.lang.Integer DEFAULT
    • Constructor Detail

      • PseudoInteger

        protected PseudoInteger()
        Prevents external instantiation.
    • Method Detail

      • add

        public static int add​(int i1,
                              int i2)
        Represents the addition for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 + i2
      • subtract

        public static int subtract​(int i1,
                                   int i2)
        Represents the subtraction for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 - i2
      • multiplication

        public static int multiplication​(int i1,
                                         int i2)
        Represents the multiplication for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 * i2
      • division

        public static double division​(int i1,
                                      int i2)
        Represents the division for integers with remainder.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 / i2 as real
      • div

        public static int div​(int i1,
                              int i2)
        Represents the division for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 / i2 as integer
      • lessThan

        public static boolean lessThan​(int i1,
                                       int i2)
        Represents the less-then comparison for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 < i2
      • lessEqualThan

        public static boolean lessEqualThan​(int i1,
                                            int i2)
        Represents the less-then-equals comparison for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 <= i2
      • greaterEqualThan

        public static boolean greaterEqualThan​(int i1,
                                               int i2)
        Represents the greater-then-equals comparison for integer.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 >= i2
      • greaterThan

        public static boolean greaterThan​(int i1,
                                          int i2)
        Represents the greater comparison for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 >= i2
      • equals

        public static boolean equals​(int i1,
                                     int i2)
        Represents the equality operation for integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 == i2
      • unequals

        public static boolean unequals​(int i1,
                                       int i2)
        Represents the unequality operation for Integers.
        Parameters:
        i1 - the first integer to be considered
        i2 - the second integer to be considered
        Returns:
        i1 != i2
      • negates

        public static int negates​(int i0)
        Negates the given integer value.
        Parameters:
        i0 - the integer to be negated
        Returns:
        -i0
      • intAbs

        public static int intAbs​(int i0)
        Returns the absolute value of the given integer value.
        Parameters:
        i0 - the integer the absolute value shall be returned for
        Returns:
        |i0|
      • convert

        public static double convert​(int val)
        Conversion operation.
        Parameters:
        val - the value to be converted
        Returns:
        the converted value
      • mod

        public static int mod​(int i1,
                              int i2)
        Returns the modulo value of i1 and i2.
        Parameters:
        i1 - the first value to be considered
        i2 - the first value to be considered
        Returns:
        i1 % i2
      • min

        public static int min​(int i1,
                              int i2)
        Returns the minimum value of i1 and i2.
        Parameters:
        i1 - the first value to be considered
        i2 - the first value to be considered
        Returns:
        min(i1, i2)
      • max

        public static int max​(int i1,
                              int i2)
        Returns the maximum value of i1 and i2.
        Parameters:
        i1 - the first value to be considered
        i2 - the first value to be considered
        Returns:
        max(i1, i2)
      • toString

        public static java.lang.String toString​(int i0)
        Returns the string value of i0.
        Parameters:
        i0 - the int to be turned into a string
        Returns:
        the string value
      • getType

        public static TypeDescriptor<?> getType​(java.lang.Integer value)
        Returns the type of value. "Overrides" PseudoAny.getType(Object).
        Parameters:
        value - the Integer to return the type for
        Returns:
        the type of object (null if ob is null)