Example usage for java.util Collections unmodifiableList

List of usage examples for java.util Collections unmodifiableList

Introduction

In this page you can find the example usage for java.util Collections unmodifiableList.

Prototype

public static <T> List<T> unmodifiableList(List<? extends T> list) 

Source Link

Document

Returns an unmodifiable view of the specified list.

Usage

From source file:com.rationaldevelopers.oss.ApplicationConfiguration.java

@Bean(name = "serverIpAddresses")
public List<String> getServerAddresses() {
    String[] addresses = { "127.0.0.1" };
    return Collections.unmodifiableList(Arrays.asList(addresses));
}

From source file:com.joyveb.dbpimpl.cass.prepare.schema.AbstractFindOperation.java

@Override
public List<T> transform(ResultSet resultSet) {
    List<T> result = Lists.newArrayList();
    for (Row row : resultSet) {
        T obj = entityReader.read(entityClass, row);
        result.add(obj);//  w  w w  .j av a2s  .c om
    }
    return Collections.unmodifiableList(result);

}

From source file:com.atlassian.connector.commons.misc.IntRanges.java

@NotNull
public List<IntRange> getRanges() {
    return Collections.unmodifiableList(ranges);
}

From source file:org.apache.cxf.fediz.service.idp.protocols.ApplicationProtocolControllerImpl.java

@Override
public List<String> getProtocols() {
    List<String> protocols = new ArrayList<String>();
    for (ApplicationProtocolHandler protocolHandler : protocolHandlers) {
        protocols.add(protocolHandler.getProtocol());
    }//from   w w w . ja va2 s. c  om
    return Collections.unmodifiableList(protocols);
}

From source file:cf.nats.message.ComponentAnnounce.java

public ComponentAnnounce(@JsonProperty("type") String type, @JsonProperty("index") Integer index,
        @JsonProperty("uuid") String uuid, @JsonProperty("host") String host,
        @JsonProperty("credentials") List<String> credentials, @JsonProperty("start") String start,
        @JsonProperty("uptime") String uptime) {
    this.type = type;
    this.index = index;
    this.uuid = uuid;
    this.host = host;
    this.credentials = Collections.unmodifiableList(new ArrayList<>(credentials));
    this.start = start;
    this.uptime = uptime;
}

From source file:it.reply.orchestrator.config.WorkflowConfigProducerBean.java

private void initResourceList() {
    resources = new ArrayList<>();
    resources.add(DEPLOY);//from w  w  w  .  ja v a 2s  .  c  om
    resources.add(UNDEPLOY);
    resources.add(UPDATE);
    resources.add(RANK_CLOUD_PROVIDERS);
    resources = Collections.unmodifiableList(resources);
}

From source file:de.xirp.io.format.FormatParser.java

/**
 * Gets the formats, which were parsed from the given string.
 * //from   w w  w .ja v  a 2  s.  c  om
 * @return Returns an unmodifiable list view of the formats.
 */
public List<Format> getFormats() {
    return Collections.unmodifiableList(formats);
}

From source file:org.apache.cxf.fediz.service.idp.protocols.TrustedIdpProtocolControllerImpl.java

@Override
public List<String> getProtocols() {
    List<String> protocols = new ArrayList<String>();
    for (TrustedIdpProtocolHandler protocolHandler : protocolHandlers) {
        protocols.add(protocolHandler.getProtocol());
    }/*from   w w w  .  jav  a2  s .c om*/
    return Collections.unmodifiableList(protocols);
}

From source file:com.eatnumber1.util.io.FileUtils.java

@NotNull
private static List<File> getFileElements(@NotNull File f) {
    List<File> cachedDirs = fileElementCache.get(f);
    if (cachedDirs != null)
        return cachedDirs;
    List<File> dirs = new LinkedList<File>();
    File dir = f.getParentFile();
    while (dir != null) {
        dirs.add(dir);//from  ww  w .j a  v a 2  s. c  o  m
        dir = dir.getParentFile();
    }
    Collections.reverse(dirs);
    dirs = Collections.unmodifiableList(dirs);
    fileElementCache.put(f, dirs);
    return dirs;
}

From source file:com.nhncorp.lucy.security.xss.config.AttributeRule.java

public List<Pattern> getAllowedPatterns() {
    return Collections.unmodifiableList(this.patterns);
}