/** * Append given list buffer at length, forming and returning a new * list. */ public ImmutableList<A> appendList(final ListBuffer<A> x) { return appendList(x.toList()); }
/** * Append all elements in a list to buffer. */ public ListBuffer<A> appendList(final ListBuffer<A> xs) { return appendList(xs.toList()); }
/** * Append all elements in a list to buffer. */ public ListBuffer<A> appendList(final ListBuffer<A> xs) { return appendList(xs.toList()); }
/** * Append given list buffer at length, forming and returning a new * list. */ public ImmutableList<A> appendList(final ListBuffer<A> x) { return appendList(x.toList()); }
/** * Append given list buffer at length, forming and returning a new * list. */ public ImmutableList<A> appendList(final ListBuffer<A> x) { return appendList(x.toList()); }
/** * Append all elements in a list to buffer. */ public ListBuffer<A> appendList(final ListBuffer<A> xs) { return appendList(xs.toList()); }
public void adapt(final Type source, final Type target) throws AdaptFailure { visit(source, target); ImmutableList<Type<?>> fromList = from.toList(); ImmutableList<Type<?>> toList = to.toList(); while (!fromList.isEmpty()) { final Type t = mapping.get(fromList.head); if (toList.head != t) { toList.head = t; } fromList = fromList.tail; toList = toList.tail; } }
public void adapt(final Type source, final Type target) throws AdaptFailure { visit(source, target); ImmutableList<Type<?>> fromList = from.toList(); ImmutableList<Type<?>> toList = to.toList(); while (!fromList.isEmpty()) { final Type t = mapping.get(fromList.head); if (toList.head != t) { toList.head = t; } fromList = fromList.tail; toList = toList.tail; } }
public void adapt(final Type source, final Type target) throws AdaptFailure { visit(source, target); ImmutableList<Type<?>> fromList = from.toList(); ImmutableList<Type<?>> toList = to.toList(); while (!fromList.isEmpty()) { final Type t = mapping.get(fromList.head); if (toList.head != t) { toList.head = t; } fromList = fromList.tail; toList = toList.tail; } }
private static ImmutableList<Type<?>> closureMin(ImmutableList<Type<?>> cl) { final ListBuffer<Type<?>> classes = lb(); final ListBuffer<Type<?>> interfaces = lb(); while (!cl.isEmpty()) { final Type current = cl.head; if (current.isInterface()) { interfaces.append(current); } else { classes.append(current); } final ListBuffer<Type<?>> candidates = lb(); for (final Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) { candidates.append(t); } } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
private static ImmutableList<Type<?>> closureMin(ImmutableList<Type<?>> cl) { final ListBuffer<Type<?>> classes = lb(); final ListBuffer<Type<?>> interfaces = lb(); while (!cl.isEmpty()) { final Type current = cl.head; if (current.isInterface()) { interfaces.append(current); } else { classes.append(current); } final ListBuffer<Type<?>> candidates = lb(); for (final Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) { candidates.append(t); } } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
private static ImmutableList<Type<?>> closureMin(ImmutableList<Type<?>> cl) { final ListBuffer<Type<?>> classes = lb(); final ListBuffer<Type<?>> interfaces = lb(); while (!cl.isEmpty()) { final Type current = cl.head; if (current.isInterface()) { interfaces.append(current); } else { classes.append(current); } final ListBuffer<Type<?>> candidates = lb(); for (final Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) { candidates.append(t); } } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
private static TypeList freshTypeVariables(final TypeList types) { final ListBuffer<Type<?>> result = lb(); for (final Type t : types) { if (t.isWildcardType()) { final Type bound = t.getExtendsBound(); result.append(new CapturedType(Type.Bottom, bound, Type.Bottom, t)); } else { result.append(t); } } return new TypeList(result.toList()); }
private static TypeList freshTypeVariables(final TypeList types) { final ListBuffer<Type<?>> result = lb(); for (final Type t : types) { if (t.isWildcardType()) { final Type bound = t.getExtendsBound(); result.append(new CapturedType(Type.Bottom, bound, Type.Bottom, t)); } else { result.append(t); } } return new TypeList(result.toList()); }
private static TypeList freshTypeVariables(final TypeList types) { final ListBuffer<Type<?>> result = lb(); for (final Type t : types) { if (t.isWildcardType()) { final Type bound = t.getExtendsBound(); result.append(new CapturedType(Type.Bottom, bound, Type.Bottom, t)); } else { result.append(t); } } return new TypeList(result.toList()); }