List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:hr.fer.spocc.grammar.Grammar.java
public Set<Terminal<T>> getTerminals() { return Collections.unmodifiableSet(terminals); }
From source file:org.snippr.business.entities.User.java
/** * Gets the labels for this user */ public Set<Label> getLabels() { return Collections.unmodifiableSet(this.labels); }
From source file:org.n52.iceland.ogc.swes.OfferingExtensionRepository.java
@Override public Set<OfferingExtensionKey> getKeys() { return Collections.unmodifiableSet(this.offeringExtensionProviders.keySet()); }
From source file:com.enonic.cms.core.structure.SiteData.java
public Set<String> getAllowedPageTypes() { Element rootEl = getAndEnsureRootElement(); Element pageTypesEl = getAndEnsureElement(rootEl, "pagetypes"); Set<String> pageTypes = new HashSet<String>(); @SuppressWarnings({ "unchecked" }) List<Element> childrenEl = pageTypesEl.getChildren("allow"); for (Element allowEl : childrenEl) { pageTypes.add(allowEl.getAttributeValue("type")); }/*from w w w . j a v a 2 s. c o m*/ return Collections.unmodifiableSet(pageTypes); }
From source file:de.kaiserpfalzEdv.office.core.security.OfficeLoginTicket.java
public Set<String> getEntitlements() { return Collections.unmodifiableSet(entitlements); }
From source file:de.kaiserpfalzEdv.office.core.security.impl.SecurityTicket.java
public Set<String> getEntitlements() { return Collections.unmodifiableSet(new HashSet<>()); }
From source file:com.bstek.dorado.view.PrivateDataTypeManager.java
public Set<String> getPrivateDataTypeNames() { Set<String> names = new HashSet<String>(super.getDataTypeNames()); if (privateDataTypeMap != null) { names.addAll(privateDataTypeMap.keySet()); }//from ww w. ja v a 2s . c om return Collections.unmodifiableSet(names); }
From source file:com.github.rvesse.airline.utils.AirlineUtils.java
public static <T> Set<T> unmodifiableSetCopy(Iterable<T> iterable) { if (iterable == null) return Collections.emptySet(); LinkedHashSet<T> set = new LinkedHashSet<T>(); Iterator<T> iter = iterable.iterator(); while (iter.hasNext()) { set.add(iter.next());/*from w ww.j av a 2 s . c om*/ } return Collections.unmodifiableSet(set); }
From source file:hr.fer.spocc.grammar.Grammar.java
public Set<Symbol<T>> getLeftSideSymbols() { return Collections.unmodifiableSet(leftSideSymbolMap.keySet()); }
From source file:com.rockagen.gnext.service.spring.security.extension.BasicSecurityUser.java
/** * Instantiates a new smart user.//ww w .j av a 2 s .c om * * @param username * the username * @param password * the password * @param enabled * the enabled * @param accountNonExpired * the account non expired * @param credentialsNonExpired * the credentials non expired * @param accountNonLocked * the account non locked * @param authorities * the authorities * @param mername * the nickname * @param email * the email */ public BasicSecurityUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities, String nickname, String email, String latestIp) { 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.enabled = enabled; this.accountNonExpired = accountNonExpired; this.credentialsNonExpired = credentialsNonExpired; this.accountNonLocked = accountNonLocked; this.authorities = Collections.unmodifiableSet(sortAuthorities(authorities)); // extend this.nickname = nickname; this.email = email; this.latestIp = latestIp; }