blob: bd3a49c6e32f52a29e7963e65ec162e22048b904 [file] [log] [blame]
Luca Prete83bac342016-12-06 19:42:05 -08001/*
2 * Copyright 2015-present 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.sdnip.cli.completer;
17
18import org.onosproject.cli.AbstractChoicesCompleter;
19import org.onosproject.net.EncapsulationType;
20
21import java.util.Arrays;
22import java.util.List;
23import java.util.stream.Collectors;
24
25/**
26 * SDN-IP encapsulation type completer.
27 */
28public class SdnIpEncapCompleter extends AbstractChoicesCompleter {
29
30 @Override
31 public List<String> choices() {
32 return Arrays.stream(EncapsulationType.values())
33 .map(Enum::toString)
34 .collect(Collectors.toList());
35 }
36}