Class PseudoInteger
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.PseudoReal
-
- net.ssehub.easy.instantiation.core.model.vilTypes.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.IntegerDEFAULT
-
Constructor Summary
Constructors Modifier Constructor Description protectedPseudoInteger()Prevents external instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intadd(int i1, int i2)Represents the addition for integers.static doubleconvert(int val)Conversion operation.static intdiv(int i1, int i2)Represents the division for integers.static doubledivision(int i1, int i2)Represents the division for integers with remainder.static booleanequals(int i1, int i2)Represents the equality operation for integers.static TypeDescriptor<?>getType(java.lang.Integer value)Returns the type ofvalue.static booleangreaterEqualThan(int i1, int i2)Represents the greater-then-equals comparison for integer.static booleangreaterThan(int i1, int i2)Represents the greater comparison for integers.static intintAbs(int i0)Returns the absolute value of the given integer value.static booleanlessEqualThan(int i1, int i2)Represents the less-then-equals comparison for integers.static booleanlessThan(int i1, int i2)Represents the less-then comparison for integers.static intmax(int i1, int i2)Returns the maximum value ofi1andi2.static intmin(int i1, int i2)Returns the minimum value ofi1andi2.static intmod(int i1, int i2)Returns the modulo value ofi1andi2.static intmultiplication(int i1, int i2)Represents the multiplication for integers.static intnegates(int i0)Negates the given integer value.static intsubtract(int i1, int i2)Represents the subtraction for integers.static java.lang.StringtoString(int i0)Returns the string value ofi0.static booleanunequals(int i1, int i2)Represents the unequality operation for Integers.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.PseudoReal
abs, add, ceil, division, equals, floor, getType, greaterEqualThen, greaterThan, isFinite, isInfinite, isNaN, lessEqualThen, lessThan, max, min, multiplication, negates, subtract, toString, unequals
-
-
-
-
Method Detail
-
add
public static int add(int i1, int i2)Represents the addition for integers.- Parameters:
i1- the first integer to be consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 consideredi2- 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 ofi1andi2.- Parameters:
i1- the first value to be consideredi2- the first value to be considered- Returns:
- i1 % i2
-
min
public static int min(int i1, int i2)Returns the minimum value ofi1andi2.- Parameters:
i1- the first value to be consideredi2- the first value to be considered- Returns:
- min(i1, i2)
-
max
public static int max(int i1, int i2)Returns the maximum value ofi1andi2.- Parameters:
i1- the first value to be consideredi2- the first value to be considered- Returns:
- max(i1, i2)
-
toString
public static java.lang.String toString(int i0)
Returns the string value ofi0.- 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 ofvalue. "Overrides"PseudoAny.getType(Object).- Parameters:
value- the Integer to return the type for- Returns:
- the type of object (null if
obis null)
-
-