blob: c4aaad28e46bb1778111b10951d34742f1e4a182 [file] [log] [blame]
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
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
22
23import com.google.common.collect.ImmutableList;
24
25public final class GroupBuckets {
26 private final List<GroupBucket> buckets;
27
28 /**
29 * Creates a immutable list of group bucket.
30 *
31 * @param buckets list of group bucket
32 */
33 public GroupBuckets(List<GroupBucket> buckets) {
34 this.buckets = ImmutableList.copyOf(checkNotNull(buckets));
35 }
36
37 /**
38 * Immutable list of group buckets.
39 *
40 * @return list of group bucket
41 */
42 public List<GroupBucket> buckets() {
43 return buckets;
44 }
45
46}