01: package tests;
02:
03: public class LongConvert {
04: private final static long val = -2398461842900206033L;
05:
06: public static boolean isMax(long num) {
07: return (num == Long.MAX_VALUE);
08: }
09:
10: public static boolean isMin(long num) {
11: return (num == Long.MIN_VALUE);
12: }
13:
14: public static boolean isVal(long num) {
15: return (num == val);
16: }
17:
18: public static boolean isVal(String numstr) {
19: long num = Long.parseLong(numstr);
20: return (num == val);
21: }
22: }
|