1 package org.opendaylight.controller.sal.match.extensible;
3 import javax.xml.bind.annotation.XmlAccessType;
4 import javax.xml.bind.annotation.XmlAccessorType;
5 import javax.xml.bind.annotation.XmlElement;
6 import javax.xml.bind.annotation.XmlRootElement;
8 import org.opendaylight.controller.sal.core.NodeConnector;
11 @XmlAccessorType(XmlAccessType.NONE)
12 public class InPort extends MatchField<NodeConnector> {
13 private static final long serialVersionUID = 1L;
14 public static final String TYPE = "IN_PORT";
15 private NodeConnector port;
18 * Creates a Match field for the input port
23 public InPort(NodeConnector port) {
34 public NodeConnector getValue() {
39 @XmlElement(name = "value")
40 protected String getValueString() {
41 return port.toString();
45 public NodeConnector getMask() {
50 protected String getMaskString() {
55 public boolean isValid() {
60 public boolean hasReverse() {
65 public InPort getReverse() {
70 public InPort clone() {
71 return new InPort(port);
75 public boolean isV6() {
80 public int hashCode() {
83 result = prime * result + ((port == null) ? 0 : port.hashCode());
88 public boolean equals(Object obj) {
95 if (!(obj instanceof InPort)) {
98 InPort other = (InPort) obj;
100 if (other.port != null) {
103 } else if (!port.equals(other.port)) {