Generic list. Moved from independant
declaration, should work on all models

@param args arguments with page, and size [optional]
432765
public function _list($args=null) 
    {
      $data = Ensure::Input($args);
      $data = $data->get();
      if (isset($data[0])) {
        $data = $data[0];
      }
      if (!(isset($data["size"]))) {
        $data["size"] = DEFAULTS::SIZE;			
      }
      if (!(isset($data["page"]))) {
        $data["page"] = DEFAULTS::PAGE;
      }
      $url = URIResource::Make($this->path);
      $class = get_class($this) . "Collection";

      return new $class(new DataPacketCollection($this->client->get($url, $data)));
    }
682875
public void setArgs(java.util.Collection<CodeGenNodeArg> args) {
        if (args == null) {
            this.args = null;
            return;
        }

        this.args = new java.util.ArrayList<CodeGenNodeArg>(args);
    }
1202481
@Override
    public List<T> subList(int arg0, int arg1) {
        while ( allResults.size() < arg1 && nextResultsAvailable() ) {
            moveNextResults();
        }
        
        return Collections.unmodifiableList(allResults.subList(arg0, arg1));
    }
51340
public void setList(List<T> list) {
        if (list != mList) {
            mList = list;
            if (mList == null) {
                notifyInvalidated();
            } else {
                notifyChanged();
            }
        }
    }
678574
void appendBuilders(List<RoutesBuilder> list) throws IllegalAccessException, InstantiationException {
        Set<Class<?>> classes = resolver.findImplementations(RoutesBuilder.class, packages);
        for (Class<?> aClass : classes) {
            logger.trace("Found RouteBuilder class: {}", aClass);

            // certain beans should be ignored
            if (shouldIgnoreBean(aClass)) {
                logger.debug("Ignoring RouteBuilder class: {}", aClass);
                continue;
            }

            if (!isValidClass(aClass)) {
                logger.debug("Ignoring invalid RouteBuilder class: {}", aClass);
                continue;
            }

            // type is valid so create and instantiate the builder
            @SuppressWarnings("unchecked")
            RoutesBuilder builder = instantiateBuilder((Class<? extends RoutesBuilder>) aClass);

            logger.debug("Adding instantiated RouteBuilder: {}", builder);
            list.add(builder);
        }
    }
1148918
@Override
	public void loadArgs(List<String> arguments)
	{		
		if(arguments == null || arguments.isEmpty())
			return;
		
		this.setProperties(ArgsParser.parse(arguments));
	}
643740
public TBase<?, ?> newArgs(List<Object> args) {
        requireNonNull(args, "args");
        final TBase<?, ?> newArgs = newArgs();
        final int size = args.size();
        for (int i = 0; i < size; i++) {
            ThriftFieldAccess.set(newArgs, argFields[i], args.get(i));
        }
        return newArgs;
    }
1064912
private void appendList(StringBuffer buffer, List<Object> list) {

        Iterator<Object> iter = list.iterator();
        while (iter.hasNext()) {
            Object entry = iter.next();
            buffer.append(entry).append("<br/>\n");
        }
    }
1243805
static <E> ListIterator<E> listIteratorImpl(List<E> list, int index) {
    return new AbstractListWrapper<E>(list).listIterator(index);
  }
1264903
private static <T extends Comparable<T>> List<T> lcs(List<T> arg0, List<T> arg1, int i, int j) {
        if (arg0.size() == i || arg1.size() == j) {
            return new ArrayList<>(Math.min(arg0.size(), arg1.size()));
        }

        if (arg0.get(i) != null && arg1.get(j) != null && arg0.get(i).compareTo(arg1.get(j)) == 0) {
            T t = arg0.get(i);
            List<T> list = lcs(arg0, arg1, i + 1, j + 1);
            list.add(t);
            return list;
        } else {
            List<T> l1 = lcs(arg0, arg1, i + 1, j);
            List<T> l2 = lcs(arg0, arg1, i, j + 1);
            return l1.size() > l2.size() ? l1 : l2;
        }
    }
799768
function(fnName, args) {
        var pageCount = this.cfg.getProperty(DEF_CFG.PAGES.key);

        for (var p=0;p<pageCount;++p) {
            var page = this.pages[p];
            if (page[fnName]) {
                var fn = page[fnName];
                fn.call(page, args);
            }
        } 
    }
902268
private void add( final List<String> arguments,
                      final Collection<String> argumentsToAdd )
    {
        if( argumentsToAdd != null && argumentsToAdd.size() > 0 )
        {
            arguments.addAll( argumentsToAdd );
        }
    }
124712
private static void appendImmutableList(
      IndentedLinesBuilder ilb, String typeParamSnippet, Collection<String> itemSnippets) {
    appendListOrSetHelper(ilb, "ImmutableList." + typeParamSnippet + "of", itemSnippets);
  }
906706
def listify(arg):
    
    if isinstance(arg, (set, tuple)):
        # if it is a set or tuple make it a list
        return list(arg)
    if not isinstance(arg, list):
        return [arg]
    return arg
928578
public static String orderBy(List<OrderByArg> argsList) {
		OrderByArg[] args;
		if (argsList == null) {
			args = null;
		} else {
			args = argsList.toArray(new OrderByArg[argsList.size()]);
		}
		return orderBy(args);
	}
479990
public final void setArgs(String... args) throws CmdArgsException
    {
        try
        {
            options = new HashMap<>();
            Option opt = null;
            int index = 0;
            for (String arg : args)
            {
                if (opt != null)
                {
                    options.put(opt.name, ConvertUtility.convert(opt.cls, arg));
                    opt = null;
                }
                else
                {
                    if (map.containsKey(arg))
                    {
                        opt = map.get(arg);
                        if (opt.exclusiveGroup != null)
                        {
                            if (effectiveGroup != null && !effectiveGroup.equals(opt.exclusiveGroup))
                            {
                                throw new CmdArgsException(opt.exclusiveGroup+" mix with "+effectiveGroup, this);
                            }
                            effectiveGroup = opt.exclusiveGroup;
                        }
                    }
                    else
                    {
                        break;
                    }
                }
                index++;
            }
            // defaults
            for (Option o : map.values())
            {
                if (!o.mandatory && !options.containsKey(o.name))
                {
                    options.put(o.name, o.defValue);
                }
            }
            int len = args.length-index;
            if (hasArrayArgument)
            {
                if (len < types.size())
                {
                    throw new CmdArgsException("too few arguments", this);
                }
            }
            else
            {
                if (len != types.size())
                {
                    throw new CmdArgsException("wrong number of arguments", this);
                }
            }
            arguments = new HashMap<>();
            int arraySize = len - types.size() + 1;
            int arrayIndex = Integer.MAX_VALUE;
            Object array = null;
            Class<?> componenType = null;
            if (hasArrayArgument)
            {
                arrayIndex = types.size()-1;
                Class<?> arrayType = types.get(arrayIndex);
                componenType = arrayType.getComponentType();
                array = Array.newInstance(componenType, arraySize);
                arguments.put(names.get(arrayIndex), array);
            }
            for (int ii=0;ii<len;ii++)
            {
                if (ii < arrayIndex)
                {
                    Object value = ConvertUtility.convert(types.get(ii), args[ii+index]);
                    arguments.put(names.get(ii), value);
                }
                else
                {
                    Object value = ConvertUtility.convert(componenType, args[ii+index]);
                    Array.set(array, ii - arrayIndex, value);
                }
            }
            for (Option o : map.values())
            {
                if (o.mandatory && !options.containsKey(o.name))
                {
                    throw new CmdArgsException("mandatory option "+o.name+": "+o.description+" missing", this);
                }
            }
            if (effectiveGroup != null)
            {
                for (Option o : groups.get(effectiveGroup))
                {
                    if (o.mandatory && !options.containsKey(o.name))
                    {
                        throw new CmdArgsException(effectiveGroup+" option "+o.name+": "+o.description+" missing", this);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            throw new CmdArgsException(ex, this);
        }
    }
1049205
private void addList(final WList.Type type, final WList.Separator separator,
			final boolean renderBorder, final WComponent renderer) {
		WList list = new WList(type);

		if (separator != null) {
			list.setSeparator(separator);
		}

		list.setRenderBorder(renderBorder);
		list.setRepeatedComponent(renderer);
		add(list);

		lists.add(list);
	}