比较判断types1和types2两组类，如果types1中所有的类都与types2对应位置的类相同，或者是其父类或接口，则返回<code>true</code>

@param types1 类组1
@param types2 类组2
@return 是否相同、父类或接口
14867
public static boolean isAllAssignableFrom(Class<?>[] types1, Class<?>[] types2) {
		if (ArrayUtil.isEmpty(types1) && ArrayUtil.isEmpty(types2)) {
			return true;
		}
		if (null == types1 || null == types2) {
			// 任何一个为null不相等（之前已判断两个都为null的情况）
			return false;
		}
		if (types1.length != types2.length) {
			return false;
		}

		Class<?> type1;
		Class<?> type2;
		for (int i = 0; i < types1.length; i++) {
			type1 = types1[i];
			type2 = types2[i];
			if (isBasicType(type1) && isBasicType(type2)) {
				// 原始类型和包装类型存在不一致情况
				if (BasicType.unWrap(type1) != BasicType.unWrap(type2)) {
					return false;
				}
			} else if (false == type1.isAssignableFrom(type2)) {
				return false;
			}
		}
		return true;
	}
738910
public static <T> int compare(Stream<T> s1, Stream<T> s2, Comparator<T> comp)
    {
        Iterator<T> os1 = s1.iterator();
        Iterator<T> os2 = s2.iterator();
        Comparable<T> comparable = null;
        while (os1.hasNext() && os2.hasNext())
        {
            T n1 = os1.next();
            T n2 = os2.next();
            int c;
            if (comp == null)
            {
                comparable = (Comparable<T>) n1;
                c = comparable.compareTo(n2);
            }
            else
            {
                c = comp.compare(n1, n2);
            }
            if (c != 0)
            {
                return c;
            }
        }
        boolean hn1 = os1.hasNext();
        boolean hn2 = os2.hasNext();
        if (hn1 == hn2)
        {
            return 0;
        }
        if (hn1)
        {
            return 1;
        }
        else
        {
            return -1;
        }
    }
936245
@SuppressWarnings({ "unchecked", "rawtypes" })
	public static <T> int compare(T o1, T o2, boolean isNullGreater) {
		if (o1 == o2) {
			return 0;
		} else if (null == o1) {// null 排在后面
			return isNullGreater ? 1 : -1;
		} else if (null == o2) {
			return isNullGreater ? -1 : 1;
		}
		
		if(o1 instanceof Comparable && o2 instanceof Comparable) {
			//如果bean可比较，直接比较bean
			return ((Comparable)o1).compareTo(o2);
		}
		
		if(o1.equals(o2)) {
			return 0;
		}
		
		int result = Integer.compare(o1.hashCode(), o2.hashCode());
		if(0 == result) {
			result = compare(o1.toString(), o2.toString());
		}
		
		return result;
	}
1271006
def same_type(t1, t2):
    
    if isinstance(t1, string_type) and isinstance(t2, string_type):
        return True

    return type(t1) == type(t2)
596060
public final <T2> Tuple2<T1, T2> concat(Tuple1<T2> tuple) {
        return new Tuple2<>(v1, tuple.v1);
    }
971046
public Type glb(List<Type> ts) {
        Type t1 = ts.head;
        for (Type t2 : ts.tail) {
            if (t1.isErroneous())
                return t1;
            t1 = glb(t1, t2);
        }
        return t1;
    }
584233
private int compareKinds(Kind kind1, Kind kind2) {
    if (kind1 == Kind.LENGTH && kind2 == Kind.DATA) {
      return -1;
    }

    if (kind1 == Kind.DATA && kind2 == Kind.LENGTH) {
      return 1;
    }

    return kind1.compareTo(kind2);
  }
548662
public static boolean areEquals(final String s1, final String s2) {
        return s1 == null ? s2 == null : s1.equals(s2);
    }
1173287
function (type, exp1, exp2) {
      var result;

      switch (type) {
        case '=':
          result = (exp1 === exp2);
          break;

        case '>':
          result = (exp1 > exp2);
          break;

        case '<':
          result = (exp1 < exp2);
          break;

        case '>=':
          result = (exp1 >= exp2);
          break;

        case '<=':
          result = (exp1 === exp2);
          break;

        case '<>':
          result = (exp1 != exp2);
          break;

        case 'NOT':
          result = (exp1 != exp2);
          break;
      }

      return result;
    }
1363358
public static final <T> int compare(T o1, T o2, Comparator<T> comp)
    {
        if (comp != null)
        {
            return comp.compare(o1, o2);
        }
        else
        {
            return ((Comparable<T>)o1).compareTo(o2);
        }
    }
1007499
public static <T extends Comparable<T>> int compareLists(List<T> list1, List<T> list2) {
    if (list1 == null && list2 == null)
      return 0;
    if (list1 == null || list2 == null) {
      throw new IllegalArgumentException();
    }
    int size1 = list1.size();
    int size2 = list2.size();
    int size = Math.min(size1, size2);
    for (int i = 0; i < size; i++) {
      int c = list1.get(i).compareTo(list2.get(i));
      if (c != 0)
        return c;
    }
    if (size1 < size2)
      return -1;
    if (size1 > size2)
      return 1;
    return 0;
  }
1298188
public static int compare( String s1, String s2)
	{
		if (s1 == null && s2 == null)
		{
			return 0;
		}
		else if (s1 == null && s2 != null)
		{
			return -1;
		}
		else if (s1 != null && s2 == null)
		{
			return 1;
		}
		else
		{
			return s1.compareTo(s2);
		}
	}
507965
@Override
	public int compare(E o1, E o2) {
		return comparator.compare(o2, o1);
	}
824808
public int compare(final SnomedConcept o1, final SnomedConcept o2) {
        if (o1 == o2) return 0;
        if (o1 != null) {
            if (o2 == null) return 1;
                // sort shorter mapping groups first
            else if (o1.mappingGroup.length() != o2.mappingGroup.length()) {
                return ((Integer)o1.mappingGroup.length()).compareTo(o2.mappingGroup.length());
            }
            else return o1.mappingGroup.compareTo(o2.mappingGroup);
        }
        return -1;
    }
687113
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) {
        Class<?> rawType1 = Reflections.getRawType(type1);

        // raw types have to be assignable
        if (!isAssignableFrom(rawType1, type2)) {
            return false;
        }
        // this is a raw type with missing type arguments
        if (!Types.getCanonicalType(type2).equals(type2)) {
            return true;
        }

        return matches(type1, new HierarchyDiscovery(type2));
    }
137013
public int compare(final FeatureFile ff1, final FeatureFile ff2) {
		if (ff1 != null && ff2 != null) {
			return ff1.getName().compareTo(ff2.getName());
		} else {
			return -1;
		}
	}
319941
@SuppressWarnings("unchecked")
    final int compare(Object k1, Object k2) {
        return comparator==null ? ((Comparable<? super K>)k1).compareTo((K)k2)
            : comparator.compare((K)k1, (K)k2);
    }