private static int joint(Collection<?> c1,Collection<?> c2){
  if (c1.size() < c2.size()) {
    return -1;
  }
 else   if (c2.size() < c1.size()) {
    return 1;
  }
  Collection<Object> c3=new ArrayList<Object>();
  c3.addAll(c1);
  c3.removeAll(c2);
  if (c3.size() > 0) {
    return -1;
  }
  c3.addAll(c2);
  c3.removeAll(c1);
  if (c3.size() > 0) {
    return 1;
  }
  return 0;
}

private static int joint ( Collection < ? > c1 , Collection < ? > c2 ) { if ( c1 . size ( ) < c2 . size ( ) ) { return - 1 ; } else if ( c2 . size ( ) < c1 . size ( ) ) { return 1 ; } Collection < Object > c3 = new ArrayList < Object > ( ) ; c3 . addAll ( c1 ) ; c3 . removeAll ( c2 ) ; if ( c3 . size ( ) > 0 ) { return - 1 ; } c3 . addAll ( c2 ) ; c3 . removeAll ( c1 ) ; if ( c3 . size ( ) > 0 ) { return 1 ; } return 0 ; }
returns - 1 if c1 is missing an element in c2 , 1 if c2 is missing an element in c1 , or 0 is they contain the exact same elements .
