List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:org.osiam.auth.oauth_client.ClientEntity.java
@Override @JsonIgnore public Set<String> getAuthorizedGrantTypes() { return Collections.unmodifiableSet(grants); }
From source file:com.sysunite.weaver.nifi.CreateObjectProperty.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(PROP_NODE);/*w w w .jav a2 s. c o m*/ descriptors.add(PROP_NODE_ATTRIBUTE); descriptors.add(PROP_CHILDNODE); descriptors.add(PROP_CHILDNODE_ATTRIBUTE); descriptors.add(PROP_CHILDNODE_SUB); descriptors.add(PROP_CHILDNODE_SUB_ATTRIBUTE); this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(MY_RELATIONSHIP); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:org.n52.iceland.request.operator.RequestOperatorRepository.java
@Override public Set<RequestOperatorKey> getKeys() { return Collections.unmodifiableSet(this.requestOperators.keySet()); }
From source file:it.ecubecenter.processors.zookeeper.ZookeeperList.java
@Override protected void init(final ProcessorInitializationContext context) { super.init(context); final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(ZNODE_NAME);/*from w w w . j a va 2 s . c o m*/ descriptors.add(OUTPUT_FORMAT); descriptors.add(DESTINATION); descriptors.addAll(properties); this.properties = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(SUCCESS); relationships.add(ZNODE_NOT_FOUND); relationships.add(FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:com.opensymphony.xwork2.ognl.OgnlUtil.java
@Inject(value = XWorkConstants.OGNL_EXCLUDED_PACKAGE_NAME_PATTERNS, required = false) public void setExcludedPackageNamePatterns(String commaDelimitedPackagePatterns) { Set<String> packagePatterns = TextParseUtil.commaDelimitedStringToSet(commaDelimitedPackagePatterns); Set<Pattern> packageNamePatterns = new HashSet<>(); for (String pattern : packagePatterns) { packageNamePatterns.add(Pattern.compile(pattern)); }/* www . j av a 2 s .com*/ excludedPackageNamePatterns = Collections.unmodifiableSet(packageNamePatterns); }
From source file:com.opengamma.engine.position.csv.CSVPositionSource.java
public Set<ObjectId> getPortfolioIds() { return Collections.unmodifiableSet(_portfolios.keySet()); }
From source file:com.bigdata.dastor.dht.Range.java
private static Set<Range> intersectionBothWrapping(Range first, Range that) { Set<Range> intersection = new HashSet<Range>(2); if (that.right.compareTo(first.left) > 0) intersection.add(new Range(first.left, that.right)); intersection.add(new Range(that.left, first.right)); return Collections.unmodifiableSet(intersection); }
From source file:org.web4thejob.web.dialog.DefaultEntityPersisterDialog.java
@Override public Set<CommandEnum> getSupportedCommands() { Set<CommandEnum> supported = new HashSet<CommandEnum>(super.getSupportedCommands()); supported.add(CommandEnum.VALIDATE); supported.add(CommandEnum.SAVE);//from w w w. ja v a2 s . com supported.add(CommandEnum.SAVE_AS); supported.add(CommandEnum.SAVE_ADDNEW); supported.add(CommandEnum.CLEAR); return Collections.unmodifiableSet(supported); }
From source file:edu.uci.ics.jung.graph.impl.SimpleSparseVertex.java
/** * @see edu.uci.ics.jung.graph.Vertex#getInEdges() *//*www . j a v a 2 s . c o m*/ public Set getInEdges() { Collection inEdges = getPredsToInEdges().values(); Collection adjacentEdges = getNeighborsToEdges().values(); Set edges = new HashSet(); if (inEdges != null) edges.addAll(inEdges); if (adjacentEdges != null) edges.addAll(adjacentEdges); return Collections.unmodifiableSet(edges); }
From source file:org.hawkular.apm.api.model.trace.Trace.java
/** * This method returns all properties contained in the node hierarchy * that can be used to search for the trace. * * @return Aggregated list of all the properties in the node hierarchy *///w w w .j a v a 2s .co m public Set<Property> allProperties() { Set<Property> properties = new HashSet<Property>(); for (Node n : nodes) { n.includeProperties(properties); } return Collections.unmodifiableSet(properties); }