當前位置: 首頁>>代碼示例>>Java>>正文


Java CollectionUtils.isEqualCollection方法代碼示例

本文整理匯總了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";
}
 
開發者ID:alexander-perucci,項目名稱:spring-grow,代碼行數:23,代碼來源:AdministrationUserController.java

示例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);
        }
    }
}
 
開發者ID:talentchain,項目名稱:talchain,代碼行數:23,代碼來源:BlockMiner.java

示例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);
    }
}
 
開發者ID:iterate-ch,項目名稱:cyberduck,代碼行數:11,代碼來源:BrowserController.java

示例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);

    }
 
開發者ID:quen2404,項目名稱:openapi-diff,代碼行數:15,代碼來源:SecurityRequirementsDiff.java

示例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);

}
 
開發者ID:adr,項目名稱:eadlsync,代碼行數:7,代碼來源:YStatementJustificationComparator.java


注:本文中的org.apache.commons.collections4.CollectionUtils.isEqualCollection方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。