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)
13 public class InPort extends MatchField<NodeConnector> {
14 private static final long serialVersionUID = 1L;
15 public static final String TYPE = "IN_PORT";
16 private NodeConnector port;
19 * Creates a Match field for the input port
24 public InPort(NodeConnector port) {
35 public NodeConnector getValue() {
40 @XmlElement(name = "value")
41 protected String getValueString() {
42 return port.toString();
46 public NodeConnector getMask() {
51 protected String getMaskString() {
56 public boolean isValid() {
61 public boolean hasReverse() {
66 public InPort getReverse() {
71 public InPort clone() {
72 return new InPort(port);
76 public boolean isV6() {
81 public int hashCode() {
84 result = prime * result + ((port == null) ? 0 : port.hashCode());
89 public boolean equals(Object obj) {
96 if (!(obj instanceof InPort)) {
99 InPort other = (InPort) obj;
101 if (other.port != null) {
104 } else if (!port.equals(other.port)) {