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.processpuzzle.persistence.domain.InMemoryPersistenceProvider.java

@SuppressWarnings("unchecked")
@Override//ww w . ja  va  2  s.c  o  m
public RepositoryResultSet<PersistentObject> findAll(UnitOfWork work, Class entityClass) {
    List result = Collections.unmodifiableList(new ArrayList<Object>(getEnityMap(entityClass).values()));
    return new SimpleResultSet(result);
}

From source file:com.unboundid.scim2.common.types.SchemaResource.java

/**
 * Create a new Schema resource./*from  w  w w . j  av a 2  s . co  m*/
 *
 * @param id The schema's ID.
 * @param name The schema's display name.
 * @param description The schema's human readable description.
 * @param attributes The schema's attributes.
 */
@JsonCreator
public SchemaResource(@JsonProperty(value = "id", required = true) final String id,
        @JsonProperty(value = "name") final String name,
        @JsonProperty(value = "description") final String description,
        @JsonProperty(value = "attributes", required = true) final Collection<AttributeDefinition> attributes) {
    super(id);
    this.name = name;
    this.description = description;
    this.attributes = Collections.unmodifiableList(new ArrayList<AttributeDefinition>(attributes));
}

From source file:jodtemplate.pptx.Presentation.java

public List<Image> getImages() {
    return Collections.unmodifiableList(new ArrayList<>(images.values()));
}

From source file:de.uniba.wiai.kinf.pw.projects.lillytab.terms.impl.AbstractDLRoleRestriction.java

@Override
public List<R> getRoles() {
    return Collections.unmodifiableList(_roles);
}

From source file:org.n52.io.response.OutputCollection.java

public List<T> getItems() {
    return Collections.unmodifiableList(items);
}

From source file:com.alibaba.dubbo.container.page.PageServlet.java

public List<PageHandler> getMenus() {
    return Collections.unmodifiableList(menus);
}

From source file:com.subgraph.vega.internal.http.requests.HttpRequestEngineConfig.java

@Override
public List<IHttpResponseProcessor> getResponseProcessors() {
    synchronized (responseProcessors) {
        return Collections.unmodifiableList(responseProcessors);
    }/*from  w  ww .  jav  a  2  s.  c o  m*/
}

From source file:gobblin.compaction.hive.HiveTable.java

protected HiveTable(HiveTable.Builder<?> builder) {
    this.name = builder.name;
    this.primaryKeys = Collections.unmodifiableList(builder.primaryKeys);
    this.attributes = Collections.unmodifiableList(builder.attributes);
}

From source file:com.htmlhifive.pitalium.core.model.TestResult.java

/**
 * ???ID???????????????/*  w  ww .  j  a  va  2  s .c  o  m*/
 * 
 * @param screenshotResults 1??ID???
 */
void setScreenshotResults(List<ScreenshotResult> screenshotResults) {
    if (screenshotResults == null || screenshotResults.isEmpty()) {
        this.screenshotResults = Collections.emptyList();
        return;
    }

    this.screenshotResults = Collections.unmodifiableList(screenshotResults);
}

From source file:fr.landel.utils.commons.tuple.AbstractImmutableGeneric.java

/**
 * {@inheritDoc}/*from   www .java 2 s . co  m*/
 */
@Override
protected List<T> getAll() {
    synchronized (this.all) {
        return Collections.unmodifiableList(this.all);
    }
}