当前位置: 首页>>代码示例>>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;未经允许,请勿转载。