List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:de.costache.calendar.util.IndexedEventCollection.java
@Override public Collection<CalendarEvent> getSelectedEvents() { return Collections.unmodifiableSet(new HashSet<CalendarEvent>(selectedEvents)); }
From source file:edu.uci.ics.jung.utils.SubsetManager.java
/** * Returns the vertex subset, if any, which this instance has defined * based on <code>p</code>. If this instance has defined no such * subset, returns null.//from w ww . ja v a 2 s . c om * @param p the predicate which may define a subset */ public Set getVertices(Predicate p) { Set s = (Set) getVertexMap().get(p); if (s != null) return Collections.unmodifiableSet(s); else return null; }
From source file:org.web4thejob.web.panel.DefaultQueryPanel.java
@Override public Set<CommandEnum> getSupportedCommands() { Set<CommandEnum> supported = new HashSet<CommandEnum>(super.getSupportedCommands()); supported.add(CommandEnum.QUERY);/*from w w w . java 2 s .c om*/ supported.add(CommandEnum.QUERY_LOOKUP); return Collections.unmodifiableSet(supported); }
From source file:de.fhg.iais.cortex.storage.filesystem.ComponentMapper.java
public Set<String> getComponents() { return Collections.unmodifiableSet(this.componentMappingMap.keySet()); }
From source file:org.jasig.springframework.security.portlet.authentication.PortletPreAuthenticatedAuthenticationDetailsSource.java
/** * @param portletMappableRolesRetriever//from www. j ava 2s . c o m * The MappableAttributesRetriever to use */ public void setMappableRolesRetriever(MappableAttributesRetriever portletMappableRolesRetriever) { this.portletMappableRoles = Collections .unmodifiableSet(portletMappableRolesRetriever.getMappableAttributes()); }
From source file:org.socraticgrid.hl7.ucs.nifi.processor.SendSMS.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> properties = new ArrayList<>(); properties.add(SMS_TEXT);/*from w w w. j a v a2 s . c o m*/ properties.add(SMS_NUMBER); properties.add(SMS_SERVER_URL); properties.add(SMS_SERVER_ACCOUNT_KEY); properties.add(SMS_REFERENCE); properties.add(SERVICE_STATUS_CONTROLLER_SERVICE); this.properties = Collections.unmodifiableList(properties); final Set<Relationship> relationships = new HashSet<>(); relationships.add(REL_SMS_SEND); relationships.add(REL_FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:com.act.biointerpretation.networkanalysis.NetworkEdge.java
public Set<String> getProjectorNames() { return Collections.unmodifiableSet(projectorNames); }
From source file:com.kunckle.jetpower.core.user.entity.User.java
/** * Construct the <code>User</code> with the details required by * {@link org.springframework.security.authentication.dao.DaoAuthenticationProvider}. * * @param username the username presented to the * <code>DaoAuthenticationProvider</code> * @param password the password that should be presented to the * <code>DaoAuthenticationProvider</code> * @param enabled set to <code>true</code> if the user is enabled * @param accountNonExpired set to <code>true</code> if the account has not * expired//from w ww .j a va 2 s . co m * @param credentialsNonExpired set to <code>true</code> if the credentials * have not expired * @param accountNonLocked set to <code>true</code> if the account is not * locked * @param authorities the authorities that should be granted to the caller * if they presented the correct username and password and the user * is enabled. Not null. * @throws IllegalArgumentException if a <code>null</code> value was passed * either as a parameter or as an element in the * <code>GrantedAuthority</code> collection */ public User(String username, String password, Date userRegistered, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities, Integer id) { if (((username == null) || "".equals(username)) || (password == null)) { throw new IllegalArgumentException("Cannot pass null or empty values to constructor"); } this.username = username; this.password = password; this.userRegistered = userRegistered; this.enabled = enabled; this.accountNonExpired = accountNonExpired; this.credentialsNonExpired = credentialsNonExpired; this.accountNonLocked = accountNonLocked; this.authorities = Collections.unmodifiableSet(sortAuthorities(authorities)); this.setId(id); }
From source file:com.github.mrstampy.gameboot.metrics.GameBootMetricsHelper.java
@Override public Set<Entry<String, Gauge<?>>> getGauges() { return Collections.unmodifiableSet(gauges.entrySet()); }
From source file:com.jdom.get.stuff.done.domain.Task.java
public Set<String> getTags() { return Collections.unmodifiableSet(tags); }