List of usage examples for org.apache.shiro.util CollectionUtils size
public static int size(Map m)
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); }