List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:com.vaadin.addon.jpacontainer.demo.domain.Order.java
public Set<OrderItem> getItems() { return Collections.unmodifiableSet(items); }
From source file:com.jeremydyer.nifi.processors.barcode.BarcodeScannerProcessor.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(DESTINATION);//w ww . j a v a 2 s. c om this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REL_SUCCESS); relationships.add(REL_FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:com.purbon.nifi.processors.updategeo.UpdateGeoDataProcessor.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(IP_FIELD);//from w w w . j ava 2 s . c o m this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(SUCCESS_RELATIONSHIP); relationships.add(FAILURE_RELATIONSHIP); this.relationships = Collections.unmodifiableSet(relationships); String dbFilePath = getClass().getResource("maxmind/GeoLite2-City.mmdb").getFile(); File maxmindDB = new File(dbFilePath); try { reader = new DatabaseReader.Builder(maxmindDB).build(); } catch (IOException e) { context.getNodeTypeProvider(); } mapper = new ObjectMapper(); }
From source file:com.opengamma.engine.test.MockFunction.java
@Override public Set<ValueRequirement> getRequirements(FunctionCompilationContext context, ComputationTarget target, final ValueRequirement desiredValue) { return Collections.unmodifiableSet(_requirements); }
From source file:datadidit.helpful.hints.processors.csv.converter.ConvertCSVToJSON.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(HEADER);//from w w w.ja v a2s . c o m descriptors.add(FIELD_NAMES); this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REL_SUCCESS); relationships.add(REL_FAILURE); this.relationships = Collections.unmodifiableSet(relationships); csvMapper = new CsvMapper(); }
From source file:org.agatom.springatom.data.hades.model.appointment.NAppointment.java
@Override public Collection<AppointmentTask> getTasks() { this.requireTaskList(); final Set<AppointmentTask> set = Sets.newHashSet(); set.addAll(this.tasks); return Collections.unmodifiableSet(set); }
From source file:com.joeyfrazee.nifi.processors.DuplicateByAttribute.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(ATTRIBUTE_TO_DUPLICATE_BY); descriptors.add(OUTPUT_ATTRIBUTE);//from w w w .java 2s . com this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REL_SUCCESS); relationships.add(REL_FAILURE); relationships.add(REL_ORIGINAL); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:com.jeremydyer.iot.GPIORESTProcessor.java
@Override protected void init(final ProcessorInitializationContext context) { CURRENTLY_ON.set(false);//from w w w .jav a 2 s .c o m LAST_SWITCH_TS.set(System.currentTimeMillis()); final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(PROP_SWITCH_DELAY_THRESHOLD); this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REL_TURN_ON); relationships.add(REL_TURN_OFF); relationships.add(REL_NO_CHANGE); relationships.add(REL_FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:org.n52.iceland.service.operator.ServiceOperatorRepository.java
/** * @param service//w ww . ja v a 2 s .c o m * the service * @return the supportedVersions * */ public Set<String> getSupportedVersions(String service) { return Collections.unmodifiableSet(this.supportedVersions.getOrDefault(service, Collections.emptySet())); }
From source file:ezbake.data.graph.blueprints.visibility.PropertyValueMap.java
@Override public Set<Entry<String, Object>> entrySet() { Set<Entry<String, Object>> entries = new HashSet<>(3); entries.add(new MapEntry<>(PropertyFilter.VALUE_KEY, value)); entries.add(new MapEntry<String, Object>(PropertyFilter.VISIBILITY_KEY, visibility)); if (delete != null) { entries.add(new MapEntry<String, Object>(PropertyFilter.DELETE_KEY, delete)); }//from www.j a va2s . co m return Collections.unmodifiableSet(entries); }