/*
(non-Javadoc)
@see javax.naming.Context#list(javax.naming.Name)
18277
@Override
	public NamingEnumeration<NameClassPair> list(Name name) throws NamingException
    {
        if (name.isEmpty())
            return new ListOfNames(bindings.keys());

        Object target = lookup(name);
        if (target instanceof Context)
        {
            try
            {
                return ((Context)target).list("");
            }
            finally
            {
                ((Context)target).close();
            }
        }
        throw new NotContextException(name + " cannot be listed");
    }
875964
@SuppressWarnings("unchecked")
    public static List<Element> elements(Element element, QName name) {

        return element.elements(name);
    }
63177
static List<String> string(String name, @Nullable String value) {
    if (!Strings.isNullOrEmpty(value)) {
      return Arrays.asList("--" + name, value);
    }
    return Collections.emptyList();
  }
1143986
@SuppressWarnings("unchecked")
    public static List<Element> elements(Element element, String name) {

        return element.elements(name);
    }
855642
@Override
    public ListAttribute<? super X, ?> getList(String paramName)
    {
        PluralAttribute<? super X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);

        if (isListAttribute(declaredAttrib))
        {
            return (ListAttribute<X, ?>) declaredAttrib;
        }

        declaredAttrib = getPluralAttriute(paramName);

        if (isListAttribute(declaredAttrib))
        {
            return (ListAttribute<X, ?>) declaredAttrib;
        }

        throw new IllegalArgumentException(
                "attribute of the given name and type is not present in the managed type, for name:" + paramName);
    }
1070156
public Collection<KeyTransaction> list(String name)
    {
        List<KeyTransaction> ret = new ArrayList<KeyTransaction>();
        Collection<KeyTransaction> transactions = list();
        for(KeyTransaction transaction : transactions)
        {
            if(name == null || transaction.getName().equals(name))
                ret.add(transaction);
        }
        return ret;
    }
84442
public Collection<Application> list(String name)
    {
        List<Application> ret = new ArrayList<Application>();
        Collection<Application> applications = list();
        for(Application application : applications)
        {
            if(name == null || application.getName().equals(name))
                ret.add(application);
        }
        return ret;
    }
544633
public void addValues(String name, List<V> values) {
        List<V> lo = get(name);
        if (lo == null) {
            lo = new ArrayList<>();
        }
        lo.addAll(values);
        put(name, lo);
    }
313310
public void put(String name, String value) {
    List<String> list = new ArrayList<>();
    list.add(value);
    getMap().put(name, list);
  }
565152
@Override
	public NamingEnumeration<Binding> listBindings(String name) throws NamingException
    {
        return listBindings(new CompositeName(name));
    }
1161045
@Override
	public void list(final PrintWriter out) {
		lock.readLock().lock();
		try {
			properties.list(out);
		} finally {
			lock.readLock().unlock();
		}
	}
51340
public void setList(List<T> list) {
        if (list != mList) {
            mList = list;
            if (mList == null) {
                notifyInvalidated();
            } else {
                notifyChanged();
            }
        }
    }
807957
public void setCrawlerNameList(java.util.Collection<String> crawlerNameList) {
        if (crawlerNameList == null) {
            this.crawlerNameList = null;
            return;
        }

        this.crawlerNameList = new java.util.ArrayList<String>(crawlerNameList);
    }
68507
public static List<String> get(String name, @Nullable Boolean value) {
    if (value != null) {
      if (value) {
        return Collections.singletonList("--" + name);
      }
      return Collections.singletonList("--no-" + name);
    }
    return Collections.emptyList();
  }
501155
public T lookup(String name) throws NamingException {
        T binding = super.get(name);
        if (binding != null) {
            return binding;
        }

        // Binding does not exist.  Check if any the contexts are bindings.
        String contextName = name;
        while (!(contextName = getContextName(contextName)).isEmpty()) {
            if (containsKey(contextName)) {
                throw new NotContextException(namespace + "/" + contextName);
            }
        }

        return null;
    }
1141704
public void put(String name, List<String> list) {
        remove(name);
        for (String v : list)
            if (v != null)
                add(name, v);
    }
445214
public static List<String> get(String name, @Nullable Boolean value) {
    if (Boolean.TRUE.equals(value)) {
      return Collections.singletonList("--" + name);
    }
    return Collections.emptyList();
  }