本文整理汇总了Java中org.apache.commons.collections4.CollectionUtils.isEqualCollection方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionUtils.isEqualCollection方法的具体用法?Java CollectionUtils.isEqualCollection怎么用?Java CollectionUtils.isEqualCollection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections4.CollectionUtils
的用法示例。
在下文中一共展示了CollectionUtils.isEqualCollection方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import org.apache.commons.collections4.CollectionUtils; //导入方法依赖的package包/类
@RequestMapping(value = "/update", method = { RequestMethod.POST })
public String update(@ModelAttribute User user) {
User persistentUser = userService.findByPK(user.getId());
boolean expireUserSession = !user.isActive() || !CollectionUtils.isEqualCollection(user.getRoles(), persistentUser.getRoles());
persistentUser.setFirstname(user.getFirstname());
persistentUser.setLastname(user.getLastname());
persistentUser.setEmail(user.getEmail());
persistentUser.setRoles(user.getRoles());
persistentUser.setActive(user.isActive());
persistentUser.setPasswordExpired(user.isPasswordExpired());
userService.update(persistentUser);
if (expireUserSession){
// expire user session
sessionService.expireUserSession(persistentUser);
}else{
// update user information without expiring her session
sessionService.updateUserSession(persistentUser);
}
return "redirect:/administration/user/list?success=true";
}
示例2: onPendingStateChanged
import org.apache.commons.collections4.CollectionUtils; //导入方法依赖的package包/类
private void onPendingStateChanged() {
if (!isLocalMining && externalMiner == null) return;
logger.debug("onPendingStateChanged()");
if (miningBlock == null) {
restartMining();
} else if (miningBlock.getNumber() <= ((PendingStateImpl) pendingState).getBestBlock().getNumber()) {
logger.debug("Restart mining: new best block: " + blockchain.getBestBlock().getShortDescr());
restartMining();
} else if (!CollectionUtils.isEqualCollection(miningBlock.getTransactionsList(), getAllPendingTransactions())) {
logger.debug("Restart mining: pending transactions changed");
restartMining();
} else {
if (logger.isDebugEnabled()) {
String s = "onPendingStateChanged() event, but pending Txs the same as in currently mining block: ";
for (Transaction tx : getAllPendingTransactions()) {
s += "\n " + tx;
}
logger.debug(s);
}
}
}
示例3: select
import org.apache.commons.collections4.CollectionUtils; //导入方法依赖的package包/类
private void select(final List<Path> selected) {
final NSTableView browser = this.getSelectedBrowserView();
if(CollectionUtils.isEqualCollection(this.getSelectedPaths(), selected)) {
return;
}
browser.deselectAll(null);
for(Path path : selected) {
this.select(path);
}
}
示例4: same
import org.apache.commons.collections4.CollectionUtils; //导入方法依赖的package包/类
public boolean same(SecurityRequirement left, SecurityRequirement right) {
// List<SecurityScheme.Type> leftTypes = left.keySet().stream()
// .map(x -> leftComponents.getSecuritySchemes().get(x).getType())
// .collect(Collectors.toList());
// List<SecurityScheme.Type> rightTypes = right.keySet().stream()
// .map(x -> rightComponents.getSecuritySchemes().get(x).getType())
// .collect(Collectors.toList());
//
List<Pair<SecurityScheme.Type, SecurityScheme.In>> leftTypes = getListOfSecuritySchemes(leftComponents, left);
List<Pair<SecurityScheme.Type, SecurityScheme.In>> rightTypes = getListOfSecuritySchemes(rightComponents, right);
return CollectionUtils.isEqualCollection(leftTypes, rightTypes);
}
示例5: isNeglectedEqual
import org.apache.commons.collections4.CollectionUtils; //导入方法依赖的package包/类
public static boolean isNeglectedEqual(String neglected, String differentNeglected) {
List<String> neglectedOptions = trimmedArrayOfString(neglected);
List<String> differentNeglectedOptions = trimmedArrayOfString(differentNeglected);
return CollectionUtils.isEqualCollection(neglectedOptions, differentNeglectedOptions);
}