blob: c212c16616aa90ffe9f5032994880f17a736c86f [file] [log] [blame]
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.net.group;
17
18import static com.google.common.base.Preconditions.checkNotNull;
19
20import java.util.List;
21
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -080022import com.google.common.collect.ImmutableList;
23
Srikanth Vavilapalli0599d512015-01-30 12:57:56 -080024/**
25 * Immutable collection of group operation to be used between
26 * core and provider layers of group subsystem.
27 *
28 */
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -080029public final class GroupOperations {
30 private final List<GroupOperation> operations;
31
32 /**
33 * Creates a immutable list of group operation.
34 *
35 * @param operations list of group operation
36 */
37 public GroupOperations(List<GroupOperation> operations) {
38 this.operations = ImmutableList.copyOf(checkNotNull(operations));
39 }
40
41 /**
Srikanth Vavilapalli0599d512015-01-30 12:57:56 -080042 * Returns immutable list of group operation.
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -080043 *
44 * @return list of group operation
45 */
46 public List<GroupOperation> operations() {
47 return operations;
48 }
49
50}