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.viadee.acceptancetests.roo.addon.Execution.java

public Execution(String id, String phase, Configuration configuration, String... goals) {
    Assert.notNull(id, "execution id must be specified");
    Assert.notEmpty(goals, "at least one goal must be specified");
    _id = id;// w ww.java  2  s.c o  m
    _phase = phase;
    _configuration = configuration;
    _goals = Collections.unmodifiableList(Arrays.asList(goals));
}

From source file:com.palantir.typescript.services.Request.java

public Request(String endpoint, String method, Object... arguments) {
    checkNotNull(endpoint);// w  w w .j a  v  a 2s  . c  o  m
    checkNotNull(method);
    checkNotNull(arguments);

    this.endpoint = endpoint;
    this.method = method;
    this.arguments = Collections.unmodifiableList(Arrays.asList(arguments));
}

From source file:net.community.chest.gitcloud.facade.backend.FacadeEnvironmentInitializer.java

@Override
protected void extractConfigFiles(File confDir) {
    // TODO use some automatic detection mechanism for "META-INF/conf"
    extractConfigFiles(confDir, Collections.singletonList(Pair.<String, Collection<String>>of(
            "META-INF/" + ConfigUtils.CONF_DIR_NAME,
            Collections.unmodifiableList(Arrays.asList(PROPS_FILE_NAME, "gitcloud-backend-log4j.xml")))));
}

From source file:be.ceau.chart.data.BubbleData.java

/**
 * @return unmodifiable list of all {@link BubbleDataset} objects, never
 *         {@code null}/*  www  . ja  va 2  s  . c  om*/
 */
public List<BubbleDataset> getDatasets() {
    return Collections.unmodifiableList(datasets);
}

From source file:de.fhg.iais.asc.sipmaker.SipMakerKey.java

public static SipMakerKey fromTrunk(String metadataFormat, List<String> subFormats) {
    if (StringUtils.isEmpty(metadataFormat)) {
        throw new IllegalArgumentException("Metadata format may not be empty");
    }/*from w  w w.  ja va 2  s  .c  o  m*/

    String current = metadataFormat;
    List<String> result = new ArrayList<String>();
    result.add(current);

    for (String dir : subFormats) {
        if (!StringUtils.isEmpty(dir)) {
            current = current.concat(File.separator).concat(dir);
            result.add(current);
        }
    }

    Collections.reverse(result);
    result = Collections.unmodifiableList(result);
    return new SipMakerKey(result, "");
}

From source file:com.ok2c.lightmtp.protocol.BasicDeliveryRequest.java

public BasicDeliveryRequest(final String sender, final List<String> recipients,
        final SMTPContent<ReadableByteChannel> content) {
    super();/*from  ww w .j a  va 2 s . c  o m*/
    Args.notNull(sender, "Sender");
    if (recipients == null || recipients.isEmpty()) {
        throw new IllegalArgumentException("List of recipients may not be null or empty");
    }
    Args.notNull(content, "Delivery content");
    this.sender = sender;
    this.recipients = Collections.unmodifiableList(new ArrayList<String>(recipients));
    this.content = content;
}

From source file:com.github.jrh3k5.habitat4j.rest.client.JsonDevices.java

/**
 * Gets a list of thermostats.// w ww  .j a v  a  2  s.c o m
 * 
 * @return A {@link List} of {@link JsonThermostat} objects representing the known thermostats.
 */
List<JsonThermostat> getThermostats() {
    return Collections.unmodifiableList(new ArrayList<>(thermostats.values()));
}

From source file:net.community.chest.gitcloud.facade.frontend.FacadeEnvironmentInitializer.java

@Override
protected void extractConfigFiles(File confDir) {
    // TODO use some automatic detection mechanism for "META-INF/conf"
    extractConfigFiles(confDir, Collections.singletonList(Pair.<String, Collection<String>>of(
            "META-INF/" + ConfigUtils.CONF_DIR_NAME,
            Collections.unmodifiableList(Arrays.asList(PROPS_FILE_NAME, "gitcloud-frontend-log4j.xml")))));
}

From source file:com.amazonaws.scala.AggregatorModel.java

/**
 * @param parentPomVersion the version of the parent POM to use
 * @param sdkVersion the version of the SDK to depend on
 * @param modules the list of modules to generate
 *///from  ww  w.  j  av  a 2s .  c  o m
public AggregatorModel(@JsonProperty(value = "parentPomVersion", required = true) String parentPomVersion,
        @JsonProperty(value = "sdkVersion", required = true) String sdkVersion,
        @JsonProperty(value = "modules", required = true) List<ModuleModel> modules) {

    this.parentPomVersion = parentPomVersion;
    this.sdkVersion = sdkVersion;

    this.modules = Collections.unmodifiableList(modules);
    for (ModuleModel module : modules) {
        module.setSdkVersion(sdkVersion);
    }
}

From source file:jodtemplate.resource.FileResources.java

@Override
public List<Resource> getResources() {
    return Collections.unmodifiableList(new ArrayList<>(resources.values()));
}