当前位置: 首页>>代码示例>>Java>>正文


Java CollectionUtils.addAll方法代码示例

本文整理汇总了Java中org.apache.commons.collections.CollectionUtils.addAll方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionUtils.addAll方法的具体用法?Java CollectionUtils.addAll怎么用?Java CollectionUtils.addAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.collections.CollectionUtils的用法示例。


在下文中一共展示了CollectionUtils.addAll方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BranchNode

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
/**
 * Creates a BranchNode using a logical operator and a list of children.
 * 
 * @param assertionType the node's type
 * @param childList the child nodes under this branch node.
 */
protected BranchNode( AssertionType assertionType, ExprNode... childList )
{
    super( assertionType );

    if ( null == children )
    {
        this.children = new ArrayList<>( childList.length );
    }

    CollectionUtils.addAll( children, childList );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:18,代码来源:BranchNode.java

示例2: isServerSessionWatcher

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
/**
 * Checks if a session is registered with the server as a watcher.
 *
 * @param long sessionId the session ID to check
 * @param path the path to check for watchers
 * @param type the type of watcher
 * @return true if the client session is a watcher on path for the type
 */
private boolean isServerSessionWatcher(long sessionId, String path,
        WatcherType type) {
    Set<ServerCnxn> cnxns = new HashSet<>();
    CollectionUtils.addAll(cnxns, serverFactory.getConnections().iterator());
    for (ServerCnxn cnxn : cnxns) {
        if (cnxn.getSessionId() == sessionId) {
            return getServer(serverFactory).getZKDatabase().getDataTree()
                    .containsWatcher(path, type, cnxn);
        }
    }
    return false;
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:21,代码来源:RemoveWatchesTest.java

示例3: getConfiguration

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
@GET
@Path("/configuration")
@Produces(MediaType.APPLICATION_JSON)
public String getConfiguration() {

    Configuration c = configurationProvider.get();

    Collection<String> keys = new TreeSet<>();

    CollectionUtils.addAll(keys, c.getKeys());

    StringBuilder sb = new StringBuilder();

    for (String key : keys) {
        sb.append(key);
        sb.append('=');
        sb.append(c.getString(key));
        sb.append(System.lineSeparator());
    }

    String data = sb.toString();

    Map<String, Object> map = new TreeMap<>();
    map.put("data", data);
    map.put("size", data.length());
    map.put("hash", DigestUtils.md5Hex(data));
    return gson.toJson(map);

}
 
开发者ID:after-the-sunrise,项目名称:cryptotrader,代码行数:30,代码来源:ResteasyContextListener.java

示例4: AbstractEventTriggerMatcher

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
public AbstractEventTriggerMatcher(EventTriggerMatcher... matchers) {
    this.matchers = new ArrayList<>();
    CollectionUtils.addAll(this.matchers, matchers);
}
 
开发者ID:riboseinc,项目名称:aws-codecommit-trigger-plugin,代码行数:5,代码来源:AbstractEventTriggerMatcher.java

示例5: and

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
public AbstractEventTriggerMatcher and(EventTriggerMatcher... matchers) {
    CollectionUtils.addAll(this.matchers, matchers);
    return new AndEventTriggerMatcher(this.matchers.toArray(new EventTriggerMatcher[]{}));
}
 
开发者ID:riboseinc,项目名称:aws-codecommit-trigger-plugin,代码行数:5,代码来源:AbstractEventTriggerMatcher.java

示例6: or

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
public AbstractEventTriggerMatcher or(EventTriggerMatcher... matchers) {
    CollectionUtils.addAll(this.matchers, matchers);
    return new OrEventTriggerMatcher(this.matchers.toArray(new EventTriggerMatcher[]{}));
}
 
开发者ID:riboseinc,项目名称:aws-codecommit-trigger-plugin,代码行数:5,代码来源:AbstractEventTriggerMatcher.java

示例7: getPostponedCustomers

import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
public LinkedList<QCustomer> getPostponedCustomers() {
    final LinkedList<QCustomer> list = new LinkedList<>();
    CollectionUtils.addAll(list, elements());
    return list;
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:6,代码来源:QPostponedList.java


注:本文中的org.apache.commons.collections.CollectionUtils.addAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。