Example usage for org.apache.shiro.util CollectionUtils size

List of usage examples for org.apache.shiro.util CollectionUtils size

Introduction

In this page you can find the example usage for org.apache.shiro.util CollectionUtils size.

Prototype

public static int size(Map m) 

Source Link

Document

Returns the size of the specified map or 0 if the map is null .

Usage

From source file:com.stormpath.shiro.realm.DefaultGroupRoleResolver.java

License:Apache License

public void setModeNames(Set<String> modeNames) {
    if (modeNames == null || modeNames.isEmpty()) {
        throw new IllegalArgumentException("modeNames cannot be null or empty");
    }//from w  w  w .jav  a  2s .c o m
    Set<Mode> modes = new HashSet<Mode>(CollectionUtils.size(modeNames));
    for (String name : modeNames) {
        modes.add(Mode.fromString(name));
    }
    setModes(modes);
}