Package com.illumon.iris.libs.primitives
Class ComparePrimitives
java.lang.Object
com.illumon.iris.libs.primitives.ComparePrimitives
A set of commonly used functions for comparing primitive pairs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic bytemax(byte v1, byte v2) Returns the maximum.static doublemax(byte v1, double v2) Returns the maximum.static floatmax(byte v1, float v2) Returns the maximum.static intmax(byte v1, int v2) Returns the maximum.static longmax(byte v1, long v2) Returns the maximum.static shortmax(byte v1, short v2) Returns the maximum.static doublemax(double v1, byte v2) Returns the maximum.static doublemax(double v1, double v2) Returns the maximum.static doublemax(double v1, float v2) Returns the maximum.static doublemax(double v1, int v2) Returns the maximum.static doublemax(double v1, long v2) Returns the maximum.static doublemax(double v1, short v2) Returns the maximum.static floatmax(float v1, byte v2) Returns the maximum.static doublemax(float v1, double v2) Returns the maximum.static floatmax(float v1, float v2) Returns the maximum.static doublemax(float v1, int v2) Returns the maximum.static doublemax(float v1, long v2) Returns the maximum.static floatmax(float v1, short v2) Returns the maximum.static intmax(int v1, byte v2) Returns the maximum.static doublemax(int v1, double v2) Returns the maximum.static doublemax(int v1, float v2) Returns the maximum.static intmax(int v1, int v2) Returns the maximum.static longmax(int v1, long v2) Returns the maximum.static intmax(int v1, short v2) Returns the maximum.static longmax(long v1, byte v2) Returns the maximum.static doublemax(long v1, double v2) Returns the maximum.static doublemax(long v1, float v2) Returns the maximum.static longmax(long v1, int v2) Returns the maximum.static longmax(long v1, long v2) Returns the maximum.static longmax(long v1, short v2) Returns the maximum.static shortmax(short v1, byte v2) Returns the maximum.static doublemax(short v1, double v2) Returns the maximum.static floatmax(short v1, float v2) Returns the maximum.static intmax(short v1, int v2) Returns the maximum.static longmax(short v1, long v2) Returns the maximum.static shortmax(short v1, short v2) Returns the maximum.static bytemin(byte v1, byte v2) Returns the minimum.static doublemin(byte v1, double v2) Returns the minimum.static floatmin(byte v1, float v2) Returns the minimum.static intmin(byte v1, int v2) Returns the minimum.static longmin(byte v1, long v2) Returns the minimum.static shortmin(byte v1, short v2) Returns the minimum.static doublemin(double v1, byte v2) Returns the minimum.static doublemin(double v1, double v2) Returns the minimum.static doublemin(double v1, float v2) Returns the minimum.static doublemin(double v1, int v2) Returns the minimum.static doublemin(double v1, long v2) Returns the minimum.static doublemin(double v1, short v2) Returns the minimum.static floatmin(float v1, byte v2) Returns the minimum.static doublemin(float v1, double v2) Returns the minimum.static floatmin(float v1, float v2) Returns the minimum.static doublemin(float v1, int v2) Returns the minimum.static doublemin(float v1, long v2) Returns the minimum.static floatmin(float v1, short v2) Returns the minimum.static intmin(int v1, byte v2) Returns the minimum.static doublemin(int v1, double v2) Returns the minimum.static doublemin(int v1, float v2) Returns the minimum.static intmin(int v1, int v2) Returns the minimum.static longmin(int v1, long v2) Returns the minimum.static intmin(int v1, short v2) Returns the minimum.static longmin(long v1, byte v2) Returns the minimum.static doublemin(long v1, double v2) Returns the minimum.static doublemin(long v1, float v2) Returns the maximum.static longmin(long v1, int v2) Returns the minimum.static longmin(long v1, long v2) Returns the minimum.static longmin(long v1, short v2) Returns the minimum.static shortmin(short v1, byte v2) Returns the minimum.static doublemin(short v1, double v2) Returns the minimum.static floatmin(short v1, float v2) Returns the minimum.static intmin(short v1, int v2) Returns the minimum.static longmin(short v1, long v2) Returns the minimum.static shortmin(short v1, short v2) Returns the minimum.
-
Constructor Details
-
ComparePrimitives
public ComparePrimitives()
-
-
Method Details
-
max
public static byte max(byte v1, byte v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static short max(byte v1, short v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static int max(byte v1, int v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(byte v1, long v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static float max(byte v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(byte v1, double v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static byte min(byte v1, byte v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static short min(byte v1, short v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static int min(byte v1, int v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(byte v1, long v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static float min(byte v1, float v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(byte v1, double v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static short max(short v1, byte v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static short max(short v1, short v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static int max(short v1, int v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(short v1, long v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static float max(short v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(short v1, double v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static short min(short v1, byte v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static short min(short v1, short v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static int min(short v1, int v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(short v1, long v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static float min(short v1, float v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(short v1, double v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static int max(int v1, byte v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static int max(int v1, short v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static int max(int v1, int v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(int v1, long v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(int v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(int v1, double v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static int min(int v1, byte v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static int min(int v1, short v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static int min(int v1, int v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(int v1, long v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(int v1, float v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(int v1, double v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(long v1, byte v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(long v1, long v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(long v1, int v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static long max(long v1, short v2) Returns the maximum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(long v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(long v1, double v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(long v1, byte v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(long v1, long v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(long v1, int v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static long min(long v1, short v2) Returns the minimum. Null values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(long v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(long v1, double v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static float max(float v1, byte v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static float max(float v1, short v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(float v1, int v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(float v1, long v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static float max(float v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(float v1, double v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static float min(float v1, byte v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static float min(float v1, short v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(float v1, int v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(float v1, long v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static float min(float v1, float v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(float v1, double v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(double v1, byte v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(double v1, short v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(double v1, int v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(double v1, long v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(double v1, float v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
max
public static double max(double v1, double v2) Returns the maximum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- maximum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(double v1, byte v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(double v1, short v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(double v1, int v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(double v1, long v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(double v1, double v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-
min
public static double min(double v1, float v2) Returns the minimum. Null and NaN values are excluded.- Parameters:
v1- first value.v2- second value.- Returns:
- minimum of the valid input values. If both inputs are invalid, null is returned.
-