创建一个有默认内容的集合

@param <T> 泛型
@param ele 内容
@return 集合对象
519419
public static <T> ArrayList newArrayList(T... ele) {
        ArrayList list = null;
        if (null != ele && 0 != ele.length) {
            list = newArrayList(ele.length);
            Collections.addAll(list, ele);
        }
        return list;
    }
609941
List<VariableElement> allFields(Element element) {

    List<VariableElement> list = new ArrayList<>();
    gatherProperties(list, element);
    return list;
  }
140869
public void remove(int ele) {
        int idx;

        idx = ele >> SHIFT;
        if (idx < data.length) {
            data[idx] &= ~(1 << ele);
        }
    }
1155971
public List<Taglet> getCustomTaglets(Element e) {
        switch (e.getKind()) {
            case CONSTRUCTOR:
                return getConstructorCustomTaglets();
            case METHOD:
                return getMethodCustomTaglets();
            case ENUM_CONSTANT:
            case FIELD:
                return getFieldCustomTaglets();
            case ANNOTATION_TYPE:
            case INTERFACE:
            case CLASS:
            case ENUM:
                return getTypeCustomTaglets();
            case MODULE:
                return getModuleCustomTaglets();
            case PACKAGE:
                return getPackageCustomTaglets();
            case OTHER:
                return getOverviewCustomTaglets();
            default:
                throw new AssertionError("unknown element: " + e + " ,kind: " + e.getKind());
        }
    }
888295
def to_ele(x):
    ""
    if sys.version < '3':
        return x if etree.iselement(x) else etree.fromstring(x, parser=parser)
    else:
        return x if etree.iselement(x) else etree.fromstring(x.encode('UTF-8'), parser=parser)
1086344
public static Object getObjectElem(Object obj, Object elem, Context cx, Scriptable scope)
    {
        Scriptable sobj = toObjectOrNull(cx, obj, scope);
        if (sobj == null) {
            throw undefReadError(obj, elem);
        }
        return getObjectElem(sobj, elem, cx);
    }
892116
public static <T> int indexOf(T[] objectArray, T elem)
    {
        return InternalArrayIterate.indexOf(objectArray, objectArray.length, elem);
    }
1336195
public boolean visitTopLevelInstruction(ElemTemplateElement elem)
   {
     int type = elem.getXSLToken();
     switch(type)
     {
       case Constants.ELEMNAME_TEMPLATE :
         return visitInstruction(elem);
       default:
         return true;
     }
   }
114521
function (elem)
    {
        var nsMatch;
        var from = null;

        if (this.options.matchBare) {
            from = Strophe.getBareJidFromJid(elem.getAttribute('from'));
        } else {
            from = elem.getAttribute('from');
        }

        nsMatch = false;
        if (!this.ns) {
            nsMatch = true;
        } else {
            var that = this;
            Strophe.forEachChild(elem, null, function (elem) {
                if (elem.getAttribute("xmlns") == that.ns) {
                    nsMatch = true;
                }
            });

            nsMatch = nsMatch || elem.getAttribute("xmlns") == this.ns;
        }

        var elem_type = elem.getAttribute("type");
        if (nsMatch &&
            (!this.name || Strophe.isTagEqual(elem, this.name)) &&
            (!this.type || (Array.isArray(this.type) ? this.type.indexOf(elem_type) != -1 : elem_type == this.type)) &&
            (!this.id || elem.getAttribute("id") == this.id) &&
            (!this.from || from == this.from)) {
                return true;
        }

        return false;
    }
1053738
function (ele) {
            var node = this[0];
            if (node.parentNode) {
                var parent = node.parentNode;
                if(ele instanceof vQ){
                    ele.each(function(inx,ele){
                        parent.replaceChild(ele, node);
                    });
                } else{
                    parent.replaceChild(ele, node);
                }
            }
            return this;
        }
171647
public AnnotationTypeElementDoc[] elements() {
        List<AnnotationTypeElementDoc> elements = List.nil();
        for (Scope.Entry e = tsym.members().elems; e != null; e = e.sibling) {
            if (e.sym != null && e.sym.kind == Kinds.MTH) {
                MethodSymbol s = (MethodSymbol)e.sym;
                elements = elements.prepend(env.getAnnotationTypeElementDoc(s));
            }
        }
        return
            elements.toArray(new AnnotationTypeElementDoc[elements.length()]);
    }
1137871
public List<String> getMappings(String elementName) {

        List<String> result = m_elementMappings.get(elementName);
        if (result == null) {
            result = Collections.emptyList();
        }
        return result;
    }
643521
private Collection<TypeElement> subclasses(TypeElement te) {
        Collection<TypeElement> ret = classToSubclass.get(te);
        if (ret == null) {
            ret = new TreeSet<>(utils.makeClassUseComparator());
            Set<TypeElement> subs = classtree.subClasses(te);
            if (subs != null) {
                ret.addAll(subs);
                for (TypeElement sub : subs) {
                    ret.addAll(subclasses(sub));
                }
            }
            addAll(classToSubclass, te, ret);
        }
        return ret;
    }
310271
public static Map<BioPAXElement, List<Match>> search(final Collection<? extends BioPAXElement> eles,
														 final Pattern pattern)
	{
		final Map<BioPAXElement, List<Match>> map = new ConcurrentHashMap<BioPAXElement, List<Match>>();
		final ExecutorService exec = Executors.newFixedThreadPool(10);

		for (final BioPAXElement ele : eles)
		{
			if (!pattern.getStartingClass().isAssignableFrom(ele.getModelInterface())) continue;
			
			exec.execute(new Runnable() {
				@Override
				public void run() {
					List<Match> matches = search(ele, pattern);
					if (!matches.isEmpty()) {
						map.put(ele, matches);
					}
				}
			});
		}

		exec.shutdown();
		try {
			exec.awaitTermination(10, TimeUnit.MINUTES);
		} catch (InterruptedException e) {
			throw new RuntimeException("search, failed due to exec timed out.", e);
		}

		return Collections.unmodifiableMap(new HashMap<BioPAXElement, List<Match>>(map));
	}
1110536
public Object parseIdRefElement(Element ele) {
    // A generic reference to any name of any bean.
    String refName = ele.getAttribute(BEAN_REF_ATTRIBUTE);
    if (!StringUtils.hasLength(refName)) {
      // A reference to the id of another bean in the same XML file.
      refName = ele.getAttribute(LOCAL_REF_ATTRIBUTE);
      if (!StringUtils.hasLength(refName)) {
        error("Either 'bean' or 'local' is required for <idref> element", ele);
        return null;
      }
    }
    if (!StringUtils.hasText(refName)) {
      error("<idref> element contains empty target attribute", ele);
      return null;
    }
    RuntimeBeanNameReference ref = new RuntimeBeanNameReference(refName);
    ref.setSource(extractSource(ele));
    return ref;
  }
411858
private List<XsdElement> getAllElementsRecursively(XsdAbstractElement element) {
        List<XsdElement> allGroupElements = new ArrayList<>();
        List<XsdAbstractElement> directElements = element.getXsdElements().collect(Collectors.toList());

        allGroupElements.addAll(
                directElements.stream()
                        .filter(elem1 -> elem1 instanceof XsdElement)
                        .map(elem1 -> (XsdElement) elem1)
                        .collect(Collectors.toList()));

        for (XsdAbstractElement elem : directElements) {
            if ((elem instanceof XsdMultipleElements || elem instanceof XsdGroup) && elem.getXsdElements() != null) {
                allGroupElements.addAll(getAllElementsRecursively(elem));
            }
        }

        return allGroupElements;
    }
1358295
public int indexOf(int ele) {
        int i;

        for (i = 0; i < size; i++) {
            if (data[i] == ele) {
                return i;
            }
        }
        return -1;
    }