@Override
        public int compareTo(Pair other) {
            if (this == other) {
                return 0;
            }

            Object a = mObj1;
            Object b = other.mObj1;

            firstTest: {
                if (a == null) {
                    if (b != null) {
                        return 1;
                    }
                    // Both a and b are null.
                    break firstTest;
                }
                else {
                    if (b == null) {
                        return -1;
                    }
                }

                int result = ((Comparable)a).compareTo(b);

                if (result != 0) {
                    return result;
                }
            }

            a = mObj2;
            b = other.mObj2;

            if (a == null) {
                if (b != null) {
                    return 1;
                }
                // Both a and b are null.
                return 0;
            }
            else {
                if (b == null) {
                    return -1;
                }
            }

            return ((Comparable)a).compareTo(b);
        }
Returns an estimate for the maximum length date that this date
formatter will produce. The actual formatted length will almost always
be less than or equal to this amount.
@return an estimate of the maximum length
xmppserver/src/main/java/org/jivesoftware/util/FastDateFormat.java