List of usage examples for java.util Collections unmodifiableList
public static <T> List<T> unmodifiableList(List<? extends T> list)
From source file:com.mirth.connect.userutil.MessageHeaders.java
/** * Get all header values for the given key. * //w w w .ja v a 2 s .com * @param key * The name of header key. * @return A list of all header values for the given key or null if no values exist. * */ public List<String> getHeaderList(String key) { List<String> list = delegate.get(key); if (CollectionUtils.isNotEmpty(list)) { return Collections.unmodifiableList(list); } return null; }
From source file:org.n52.io.response.dataset.Data.java
/** * @return a sorted list of measurement values. */ public List<T> getValues() { return Collections.unmodifiableList(values); }
From source file:br.com.thiaguten.persistence.demo.hbmcore.UserDAOImpl.java
@Override public List<User> findByName(String name) { List<Criterion> criterions = Collections .singletonList(Restrictions.ilike("name", name, MatchMode.ANYWHERE)); List<User> results = persistenceProvider.findByCriteria(getPersistenceClass(), criterions); if (results.isEmpty()) { return Collections.emptyList(); } else {/* ww w .j a va2s . c o m*/ return Collections.unmodifiableList(results); } }
From source file:com.yahoo.bard.webservice.util.SimplifiedIntervalList.java
/** * Method to convert SimplifiedIntervalList as regular list to address the deserialization issues. * * @return List of simplified intervals/*from ww w . j a v a 2 s . co m*/ */ @JsonValue public List<Interval> asList() { return Collections.unmodifiableList(this); }
From source file:com.nhncorp.lucy.security.xss.config.AttributeRule.java
public List<Pattern> getNotAllowedPatterns() { return Collections.unmodifiableList(this.npatterns); }
From source file:de.javagl.jgltf.model.io.JsonError.java
/** * Default constructor/* ww w. j av a2 s . co m*/ * @param message The error message * @param jsonStreamContext The JSON stream context * @param throwable An optional throwable associated with the error */ JsonError(String message, JsonStreamContext jsonStreamContext, Throwable throwable) { this.message = message; this.jsonPath = Collections.unmodifiableList(createJsonPath(jsonStreamContext)); this.throwable = throwable; }
From source file:org.kmnet.com.fw.web.mvc.support.CompositeRequestDataValueProcessor.java
/** * Constructor<br>/*from w ww . j a v a2 s . co m*/ * <p> * Sets and initializes a list of {@link RequestDataValueProcessor} * </p> * @param processors List of {@link RequestDataValueProcessor} */ public CompositeRequestDataValueProcessor(RequestDataValueProcessor... processors) { this.processors = Collections.unmodifiableList(Arrays.asList(processors)); List<RequestDataValueProcessor> reverse = Arrays.asList(processors); Collections.reverse(reverse); this.reversedProcessors = Collections.unmodifiableList(reverse); this.processActionInvocationHelper = new ProcessActionInvocationHelper(); }
From source file:com.sonatype.nexus.perftest.maven.HttpdLogParser.java
@JsonCreator public HttpdLogParser(@JsonProperty("logfile") File logfile) throws IOException { ArrayList<String> paths = new ArrayList<>(); try (BufferedReader br = new BufferedReader( new InputStreamReader(new GZIPInputStream(new FileInputStream(logfile))))) { String str;//from w w w. java 2 s . co m while ((str = br.readLine()) != null) { StringTokenizer st = new StringTokenizer(str, "[]\" "); st.nextToken(); // ip st.nextToken(); // not sure st.nextToken(); // username st.nextToken(); // [date:time st.nextToken(); // timezoneoffset] String method = st.nextToken(); // "METHOD if ("GET".equals(method)) { String path = st.nextToken(); // path if (path.startsWith(PREFIX)) { paths.add(path.substring(PREFIX.length())); } } } } this.paths = Collections.unmodifiableList(paths); }
From source file:com.unboundid.scim2.common.messages.PatchRequest.java
/** * Retrieves all the individual operations in this patch request. * * @return The individual operations in this patch request. */// www .java 2 s .c o m public List<PatchOperation> getOperations() { return Collections.unmodifiableList(operations); }
From source file:com.mirth.connect.userutil.MessageParameters.java
/** * Get all parameter values for the given key. * //from w w w .j a v a2s . c om * @param key * The name of parameter key. * @return A list of all parameter values for the given key or null if no values exist. * */ public List<String> getParameterList(String key) { List<String> list = delegate.get(key); if (CollectionUtils.isNotEmpty(list)) { return Collections.unmodifiableList(list); } return null; }