org.apache.qpid.util
Class Serial
java.lang.Object
org.apache.qpid.util.Serial
public class Serial
- extends Object
This class provides basic serial number comparisons as defined in
RFC 1982.
Method Summary |
static int |
compare(int s1,
int s2)
Compares two numbers using serial arithmetic. |
static boolean |
eq(int s1,
int s2)
|
static boolean |
ge(int s1,
int s2)
|
static boolean |
gt(int s1,
int s2)
|
static boolean |
le(int s1,
int s2)
|
static boolean |
lt(int s1,
int s2)
|
static int |
max(int s1,
int s2)
|
static int |
min(int s1,
int s2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPARATOR
public static final Comparator<Integer> COMPARATOR
Serial
public Serial()
compare
public static final int compare(int s1,
int s2)
- Compares two numbers using serial arithmetic.
- Parameters:
s1
- the first serial numbers2
- the second serial number
- Returns:
- a negative integer, zero, or a positive integer as the
first argument is less than, equal to, or greater than the
second
lt
public static final boolean lt(int s1,
int s2)
le
public static final boolean le(int s1,
int s2)
gt
public static final boolean gt(int s1,
int s2)
ge
public static final boolean ge(int s1,
int s2)
eq
public static final boolean eq(int s1,
int s2)
min
public static final int min(int s1,
int s2)
max
public static final int max(int s1,
int s2)
Licensed to the Apache Software Foundation