Compare two type lists for placewise compatibility. , assistantFactory @param to

@param to
@param from
@return True if all types compatible.
322506
public synchronized boolean compatible(List<PType> to, List<PType> from)
	{
		done.clear();
		return allCompatible(to, from, false) == Result.Yes;
	}
151604
public static void copyCriteriaNoSelection(CriteriaQuery<?> from, CriteriaQuery<?> to) {

        // Copy Roots
        for (Root<?> root : from.getRoots()) {
            Root<?> dest = to.from(root.getJavaType());
            dest.alias(getOrCreateAlias(root));
            copyJoins(root, dest);
        }

        if (from.getGroupList() != null) to.groupBy(from.getGroupList());
        to.distinct(from.isDistinct());
        if (from.getGroupRestriction() != null) to.having(from.getGroupRestriction());
        if (from.getRestriction() != null) to.where(from.getRestriction());
        if (from.getOrderList() != null) to.orderBy(from.getOrderList());
    }
847313
private static boolean matches(Type from, Type to, Map<String, Type> typeMap) {
		if (to.equals(from))
			return true;

		if (from instanceof TypeVariable) {
			return to.equals(typeMap.get(((TypeVariable<?>) from).getName()));
		}

		return false;
	}
429168
public <T extends IItem & IExpandable> void selectRange(int from, int to, boolean select) {
        selectRange(from, to, select, false);
    }
519974
protected boolean checkSliceArguments(long from, Long to) {
        if (from < 0) {
            throw new IllegalArgumentException("Slice from is negative: " + from);
        }
        if (to == null) {
            if (from == 0) {
                return false;
            }
        } else if (from > to) {
            throw new IllegalArgumentException
                ("Slice from is more than to: " + from + " > " + to);
        }
        return true;
    }
1352844
static boolean areSignaturesEqual(Class[] from, Class[] to)
    {
        if (from.length != to.length)
            return false;

        for (int i = 0; i < from.length; i++)
            if (from[i] != to[i])
                return false;

        return true;
    }
446725
def _is_type_compatible(a, b):
    """"""
    is_ts_compat = lambda x: isinstance(x, (Timestamp, DateOffset))
    is_td_compat = lambda x: isinstance(x, (Timedelta, DateOffset))
    return ((is_number(a) and is_number(b)) or
            (is_ts_compat(a) and is_ts_compat(b)) or
            (is_td_compat(a) and is_td_compat(b)) or
            com._any_none(a, b))
858781
private static boolean isUptoEligible(Temporal from, Temporal to) {
        TemporalAmount amount = rightShift(from, to);
        if (amount instanceof Period) {
            return isNonnegative((Period) amount);
        } else if (amount instanceof Duration) {
            return isNonnegative((Duration) amount);
        } else {
            throw new GroovyRuntimeException("Temporal implementations of "
                    + from.getClass().getCanonicalName() + " are not supported by upto().");
        }
    }
260682
private Result allCompatible(List<PType> to, List<PType> from,
			boolean paramOnly)
	{
		if (to.size() != from.size())
		{
			return Result.No;
		} else
		{
			for (int i = 0; i < to.size(); i++)
			{
				if (searchCompatible(to.get(i), from.get(i), paramOnly) == Result.No)
				{
					return Result.No;
				}
			}
		}

		return Result.Yes;
	}
443375
public int compareTo(NumberArray<? extends Number> to) {
		if (to == null || this.values.length > to.values.length){
			return 1;
		}else if (this.values.length < to.values.length){
			return -1;
		}
		
		CompareToBuilder b = new CompareToBuilder();
		for (int i = 0; i < this.values.length; i ++){
			b.append(this.values[i], to.values[i]);
		}
		return b.toComparison();
	}
423599
public static boolean startAny(String target, Integer toffset, List<String> startWith) {
		if (isNull(target)) {
			return false;
		}
		
		return matcher(target).starts(toffset, startWith);
	}
1331545
private Result searchCompatible(PType to, PType from, boolean paramOnly)
	{
		TypePair pair = new TypePair(to, from);
		int i = done.indexOf(pair);

		if (i >= 0)
		{
			return done.get(i).result; // May be "Maybe".
		} else
		{
			done.add(pair);
		}

		// The pair.result is "Maybe" until this call returns.
		pair.result = test(to, from, paramOnly);

		return pair.result;
	}
615408
public static boolean canConvert(Class from, Class to) {
	// Identity Conversions
	if (from == to) return true;

	// Widening Primitive Conversion
	if (from == byte.class) {
	    return to == short.class || to == int.class || to == long.class || to == float.class || to == double.class;
	}
	if (from == short.class) {
	    return to == int.class || to == long.class || to == float.class || to == double.class;
	}
	if (from == char.class) {
	    return to == int.class || to == long.class || to == float.class || to == double.class;
	}
	if (from == int.class) {
	    return to == long.class || to == float.class || to == double.class;
	}
	if (from == long.class) {
	    return to == float.class || to == double.class;
	}
	if (from == float.class) {
	    return to == double.class;
	}
	return false;
    }
789163
private function checkSymbols(array $from, array $to) : iterable
    {
        foreach (array_intersect_key($from, $to) as $index => $commonParameter) {
            yield from $this->compareParameter($commonParameter, $to[$index]);
        }
    }
334477
public void removeDependency(T from, T to) {
      lock.writeLock().lock();
      try {
         Set<T> dependencies = outgoingEdges.get(from);
         if (dependencies == null || !dependencies.contains(to)) {
            throw new IllegalArgumentException("Inexistent dependency");
         }
         dependencies.remove(to);
         incomingEdges.get(to).remove(from);
      } finally {
         lock.writeLock().unlock();
      }
   }
530032
@Override
	public boolean canConvert(Class<?> fromType, Class<?> toType) {
		return String.class.equals(fromType) && Date.class.equals(toType);
	}
105680
public boolean equalsTo(Object o)
    {
        if(o == null || !(o instanceof Reference))
        {
            return false;
        }
        
        Reference refCompared = (Reference)o;
        if(!StringUtil.isEquals(sections, refCompared.sections)) return false;
        if(systemUnderTest == null || !systemUnderTest.equalsTo(refCompared.systemUnderTest)) return false;
        if(requirement == null || !requirement.equalsTo(refCompared.requirement)) return false;
        if(specification == null || !specification.equalsTo(refCompared.specification)) return false;
        
        return true;
    }