本文整理匯總了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);
}