Package generic.util
Class UnsignedDataUtils
- java.lang.Object
-
- generic.util.UnsignedDataUtils
-
public class UnsignedDataUtils extends java.lang.Object
A class for performing unsigned comparisons of java primitives.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Simple test for the Comp class.static boolean
unsignedGreaterThan(byte i, byte j)
Returns true ifi
is GREATER THANj
.static boolean
unsignedGreaterThan(int i, int j)
Returns true ifi
is GREATER THANj
.static boolean
unsignedGreaterThan(long i, long j)
Returns true ifi
is GREATER THANj
.static boolean
unsignedGreaterThan(short i, short j)
Returns true ifi
is GREATER THANj
.static boolean
unsignedGreaterThanOrEqual(byte i, byte j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.static boolean
unsignedGreaterThanOrEqual(int i, int j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.static boolean
unsignedGreaterThanOrEqual(long i, long j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.static boolean
unsignedGreaterThanOrEqual(short i, short j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.static boolean
unsignedLessThan(byte i, byte j)
Returns true ifi
is LESS THANj
.static boolean
unsignedLessThan(int i, int j)
Returns true ifi
is LESS THANj
.static boolean
unsignedLessThan(long i, long j)
Returns true ifi
is LESS THANj
.static boolean
unsignedLessThan(short i, short j)
Returns true ifi
is LESS THANj
.static boolean
unsignedLessThanOrEqual(byte i, byte j)
Returns true ifi
is LESS THAN or EQUAL TOj
.static boolean
unsignedLessThanOrEqual(int i, int j)
Returns true ifi
is LESS THAN or EQUAL TOj
.static boolean
unsignedLessThanOrEqual(long i, long j)
Returns true ifi
is LESS THAN or EQUAL TOj
.static boolean
unsignedLessThanOrEqual(short i, short j)
Returns true ifi
is LESS THAN or EQUAL TOj
.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Simple test for the Comp class.- Parameters:
args
- not used
-
unsignedLessThan
public static boolean unsignedLessThan(byte i, byte j)
Returns true ifi
is LESS THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less thanj
-
unsignedLessThanOrEqual
public static boolean unsignedLessThanOrEqual(byte i, byte j)
Returns true ifi
is LESS THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less than or equal toj
-
unsignedGreaterThan
public static boolean unsignedGreaterThan(byte i, byte j)
Returns true ifi
is GREATER THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is greater thanj
-
unsignedGreaterThanOrEqual
public static boolean unsignedGreaterThanOrEqual(byte i, byte j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is greater than or equal toj
-
unsignedLessThan
public static boolean unsignedLessThan(short i, short j)
Returns true ifi
is LESS THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less thanj
-
unsignedLessThanOrEqual
public static boolean unsignedLessThanOrEqual(short i, short j)
Returns true ifi
is LESS THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less than or equal toj
-
unsignedGreaterThan
public static boolean unsignedGreaterThan(short i, short j)
Returns true ifi
is GREATER THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is greater thanj
-
unsignedGreaterThanOrEqual
public static boolean unsignedGreaterThanOrEqual(short i, short j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is greater than or equal toj
-
unsignedLessThan
public static boolean unsignedLessThan(int i, int j)
Returns true ifi
is LESS THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less thanj
-
unsignedLessThanOrEqual
public static boolean unsignedLessThanOrEqual(int i, int j)
Returns true ifi
is LESS THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less than or equal toj
-
unsignedGreaterThan
public static boolean unsignedGreaterThan(int i, int j)
Returns true ifi
is GREATER THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is greater thanj
-
unsignedGreaterThanOrEqual
public static boolean unsignedGreaterThanOrEqual(int i, int j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is greater than or equal toj
-
unsignedLessThan
public static boolean unsignedLessThan(long i, long j)
Returns true ifi
is LESS THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less thanj
-
unsignedLessThanOrEqual
public static boolean unsignedLessThanOrEqual(long i, long j)
Returns true ifi
is LESS THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- true if
i
is less than or equal toj
-
unsignedGreaterThan
public static boolean unsignedGreaterThan(long i, long j)
Returns true ifi
is GREATER THANj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- return true if
i
is greater thanj
-
unsignedGreaterThanOrEqual
public static boolean unsignedGreaterThanOrEqual(long i, long j)
Returns true ifi
is GREATER THAN or EQUAL TOj
.- Parameters:
i
- an argumentj
- another argument- Returns:
- return true if
i
is greater than or equal toj
-
-