示例#1
0
 public static InitCount max(InitCount a, InitCount b) {
   if (MANY.equals(a) || MANY.equals(b)) {
     return MANY;
   }
   if (ONE.equals(a) || ONE.equals(b)) {
     return ONE;
   }
   return ZERO;
 }
示例#2
0
 public static InitCount min(InitCount a, InitCount b) {
   if (ZERO.equals(a) || ZERO.equals(b)) {
     return ZERO;
   }
   if (ONE.equals(a) || ONE.equals(b)) {
     return ONE;
   }
   return MANY;
 }
示例#3
0
 static MinMaxInitCount join(MinMaxInitCount initCount1, MinMaxInitCount initCount2) {
   if (initCount1 == null) {
     return initCount2;
   }
   if (initCount2 == null) {
     return initCount1;
   }
   MinMaxInitCount t =
       new MinMaxInitCount(
           InitCount.min(initCount1.getMin(), initCount2.getMin()),
           InitCount.max(initCount1.getMax(), initCount2.getMax()));
   return t;
 }
示例#4
0
 public int hashCode() {
   return min.hashCode() * 4 + max.hashCode();
 }