blob: 95694a2a6e495ce45055ad6cbbe9c02f0bcff553 [file] [log] [blame]
Jian Li44155b02017-02-15 17:03:38 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Jian Li44155b02017-02-15 17:03:38 +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.actions;
17
18import java.util.Objects;
19
20/**
21 * Represents a Drop Action mapping.
22 */
23public final class DropMappingAction implements MappingAction {
24
25 /**
26 * Default constructor of DropMappingAction.
27 */
28 DropMappingAction() {
29 }
30
31 @Override
32 public Type type() {
33 return Type.DROP;
34 }
35
36 @Override
37 public String toString() {
38 return type().toString();
39 }
40
41 @Override
42 public int hashCode() {
43 return Objects.hash(type());
44 }
45
46 @Override
47 public boolean equals(Object obj) {
Jian Li4014e132017-02-24 20:18:59 +090048 return this == obj || obj instanceof DropMappingAction;
Jian Li44155b02017-02-15 17:03:38 +090049 }
50}