blob: 332aaaaa883a7ae21e006bb043b531f5fca92276 [file] [log] [blame]
Jian Lia0bf4592017-02-03 17:43:21 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Jian Lia0bf4592017-02-03 17:43:21 +09003 *
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.mapping;
17
Jian Li0e09eaa2017-02-14 02:01:18 +090018import org.onosproject.mapping.addresses.MappingAddress;
Jian Li136fd6c2017-02-10 14:54:59 +090019
Jian Lia0bf4592017-02-03 17:43:21 +090020/**
Jian Li136fd6c2017-02-10 14:54:59 +090021 * Abstraction of network mapping key.
Jian Lia0bf4592017-02-03 17:43:21 +090022 */
23public interface MappingKey {
Jian Li136fd6c2017-02-10 14:54:59 +090024
25 /**
26 * Returns a mapping address.
27 *
28 * @return a mapping address
29 */
30 MappingAddress address();
31
32 interface Builder {
33
34 /**
35 * Specifies a mapping address.
36 *
37 * @param address mapping address
38 * @return a mapping key builder
39 */
40 Builder withAddress(MappingAddress address);
41
42 /**
43 * Builds an immutable mapping key.
44 *
45 * @return a mapping key
46 */
47 MappingKey build();
48 }
Jian Lia0bf4592017-02-03 17:43:21 +090049}