List should be declared as Collection where possible
773405
public String max(List<String> s) {
        String max = "";
        for (String p : s) {
            if (p.length() > max.length()) {
                max = p;
            }
        }

        return max;
    }
1134424
static Collection<AbstractType> asList( Component extendedComponent ) {

		Collection<AbstractType> result;
		if( extendedComponent == null ) {
			result = new ArrayList<AbstractType>( 0 );

		} else {
			result = new ArrayList<AbstractType>( 1 );
			result.add( extendedComponent );
		}

		return result;
	}
184571
public <T extends DataObject> List<T> collect(Class<T> type) {
        return collect(type, null);
    }
967075
@SuppressWarnings("unchecked")
    public static <T> Collection<T> asCollection(Object value) {
        if (value instanceof Collection) {
            return (Collection) value;
        }
        throw new IncompatibleValueException(
                "Unable to convert " + value.getClass().getSimpleName() + " to a collection");
    }
494409
function(list, cb) {
                // Normal arrays don't get live updated
                if (can.isArray(list)) {
                    this.list(list, cb);
                } else {
                    can.view.lists(list, cb);
                }
            }
1199361
protected void checkCollectionType(Collection c) {
        if (type != null) {
            for (Object element : c) {
                checkType(element);
            }
        }
    }
1003723
function Collection(options) {
  Base.call(this, options);
  this.define('lists', {});
  this.define('_items', {});
  this.define('Item', this.options.Item || require('./item'));
  this.define('List', this.options.List || require('./list'));
  mixins(this);

  /**
   * Get an object representing the current items on the instance.
   *
   * ```js
   * var items = this.items;
   * ```
   *
   * @return {Object} Object of items
   */

  Object.defineProperty(this, 'items', {
    enumerable: false,
    configurable: true,
    get: function () {
      return this._items;
    },
    set: function (items) {
      lazy.forIn(items, function (item, key) {
        delete this._items[key];
        delete this[key];
        this.set(key, item);
      }, this);
    }
  });
}
1211273
function Collection(response, dispatcher, dispatchOptions) {
  if (!Collection.isCollectionResponse(response)) {
    throw new Error(
        'Cannot create Collection from response that does not have resources');
  }

  this.data = response.data;
  this._response = response;
  this._dispatcher = dispatcher;
  this._dispatchOptions = dispatchOptions;
}
599651
private <T> boolean addToListInternal(Collection<T> list, T value) {
        if (!list.contains(value)) {
            list.add(value);
            isModified = true;
            return true;
        } else {
            return false;
        }
    }
585634
public static List<Integer> asList (int[] list)
    {
        if (list == null) {
            return null;
        }
        List<Integer> ilist = new ArrayList<Integer>(list.length);
        for (int ii = 0; ii < list.length; ii++) {
            ilist.add(list[ii]);
        }
        return ilist;
    }
830789
private static boolean checkCollectionMembers(Collection<?> c, Class<?> type) {
        for (Object element : c) {
            if (element != null && !type.isInstance(element)) {
                return false;
            }
        }
        return true;
    }
1351686
private boolean isCollection(Class<?> rawType) {

    // this sucks... is there really no way to work around this in GWT?
    // http://code.google.com/p/google-web-toolkit/issues/detail?id=4663
    if (rawType == Collection.class) {
      return true;
    }
    if (rawType == List.class) {
      return true;
    }
    if (rawType == Set.class) {
      return true;
    }
    Class<?> superType = rawType;
    while (superType != null) {
      if (superType == AbstractCollection.class) {
        return true;
      }
      superType = superType.getSuperclass();
    }
    return false;
  }
1164411
def DEFINE_list(self, name, default, help, constant=False):
    """"""
    self.AddOption(
        type_info.List(
            name=name,
            default=default,
            description=help,
            validator=type_info.String()),
        constant=constant)
942759
protected Object add(Object list, Collection collection)
    {
        Iterator i=collection.iterator();
        while(i.hasNext())
            list=LazyList.add(list,i.next());
        return list;
    }
734204
public static ListIterator listIterator(Object list)
    {
        if (list==null)
            return Collections.EMPTY_LIST.listIterator();
        if (list instanceof List)
            return ((List)list).listIterator();
        return getList(list).listIterator();
    }
211197
def list(type, sym, count: nil)
      if count
        raise BadCountError unless count.positive?
      end

      @expected << [:list, type, sym, count]
    end
620675
public static <T> List<T> convertCollectionToList(final Collection<T> collection) {

        if(List.class.isAssignableFrom(collection.getClass())) {
            return (List<T>)collection;
        }

        return new ArrayList<>(collection);

    }