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:Main.java

public static <T> List<T> unmodifiableList(final List<? extends T> l) {
    if (l == null) {
        return null;
    }/*from   w  w w . j  av a2  s. c o  m*/

    return Collections.unmodifiableList(l);
}

From source file:org.geonode.security.LayersGrantedAuthority.java

public LayersGrantedAuthority(final List<String> layerNames, final LayerMode accessMode) {
    super();//w ww  . j a  v a2s  .c o m
    this.layerNames = Collections.unmodifiableList(new ArrayList<String>(layerNames));
    this.accessMode = accessMode;
}

From source file:com.sinnerschrader.s2b.accounttool.logic.component.licences.Dependency.java

Dependency(String groupId, String artifactId, String version, License... licenses) {
    this.artifactId = artifactId;
    this.groupId = groupId;
    this.version = version;
    this.licenses = Collections.unmodifiableList(Arrays.asList(licenses));
}

From source file:edu.stanford.junction.props2.sample.ListState.java

public Collection<JSONObject> items() {
    return Collections.unmodifiableList((List) items);
}

From source file:io.netty.handler.codec.mqtt.MqttUnsubscribePayload.java

public MqttUnsubscribePayload(List<String> topics) {
    this.topics = Collections.unmodifiableList(topics);
}

From source file:com.redsaz.deciservice.api.model.Notes.java

@JsonCreator
public Notes(@JsonProperty("notes") List<Note> inNotes) {
    notes = Collections.unmodifiableList(new ArrayList<>(inNotes));
}

From source file:io.netty.handler.codec.mqtt.MqttSubscribePayload.java

public MqttSubscribePayload(List<MqttTopicSubscription> subscriptions) {
    this.subscriptions = Collections.unmodifiableList(subscriptions);
}

From source file:com.mmj.app.web.tools.EnumViewTools.java

public static List<SubjectEnum> getSubjectMenu() {
    if (subjectEnumList == null) {
        subjectEnumList = new ArrayList<SubjectEnum>();
        for (SubjectEnum _enum : SubjectEnum.values()) {
            if (_enum == SubjectEnum.ALL) {
                continue;
            }//  w w w  .j  a va 2s. c  o m
            subjectEnumList.add(_enum);
        }
        subjectEnumList = Collections.unmodifiableList(subjectEnumList);
    }
    return subjectEnumList;
}

From source file:grails.plugin.springsecurity.openid.GrailsAxFetchListFactory.java

public GrailsAxFetchListFactory(List<OpenIDAttribute> attributes) {
    fetchAttrs = Collections.unmodifiableList(attributes);
}

From source file:com.zb.app.web.tools.EnumViewTools.java

public static List<OrderStateEnum> getAllOrderState() {
    if (orderStateEnumList == null) {
        orderStateEnumList = new ArrayList<OrderStateEnum>();
        for (OrderStateEnum _enum : OrderStateEnum.values()) {
            orderStateEnumList.add(_enum);
        }/*www .  ja  va 2s. com*/
        orderStateEnumList = Collections.unmodifiableList(orderStateEnumList);
    }
    return orderStateEnumList;
}