本文整理汇总了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 );
}
示例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;
}
示例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);
}
示例4: AbstractEventTriggerMatcher
import org.apache.commons.collections.CollectionUtils; //导入方法依赖的package包/类
public AbstractEventTriggerMatcher(EventTriggerMatcher... matchers) {
this.matchers = new ArrayList<>();
CollectionUtils.addAll(this.matchers, matchers);
}
示例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[]{}));
}
示例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[]{}));
}
示例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;
}