X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fmatch%2Fextensible%2FTpDst.java;fp=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fmatch%2Fextensible%2FTpDst.java;h=0000000000000000000000000000000000000000;hp=022db4cc174648b4ac127dec22032e466d2d4739;hb=42c32160bfd41de57189bb246fec5ffb48ed8e9e;hpb=edf5bfcee83c750853253ccfd991ba7000f5f65b diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/extensible/TpDst.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/extensible/TpDst.java deleted file mode 100644 index 022db4cc17..0000000000 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/extensible/TpDst.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.opendaylight.controller.sal.match.extensible; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import org.opendaylight.controller.sal.utils.NetUtils; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -public class TpDst extends MatchField { - private static final long serialVersionUID = 1L; - public static final String TYPE = "TP_DST"; - private short port; - - /** - * Creates a Match field for the transport destination port - * - * @param port - * the transport port - */ - public TpDst(short port) { - super(TYPE); - this.port = port; - } - - // To satisfy JAXB - private TpDst() { - super(TYPE); - } - - @Override - public Short getValue() { - return port; - } - - @Override - @XmlElement(name = "value") - protected String getValueString() { - return String.valueOf(NetUtils.getUnsignedShort(port)); - } - - @Override - public Short getMask() { - return null; - } - - @Override - protected String getMaskString() { - return null; - } - - @Override - public boolean isValid() { - return true; - } - - @Override - public TpSrc getReverse() { - return new TpSrc(port); - } - - @Override - public boolean hasReverse() { - return true; - } - - @Override - public TpDst clone() { - return new TpDst(port); - } - - @Override - public boolean isV6() { - return true; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + port; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof TpDst)) { - return false; - } - TpDst other = (TpDst) obj; - if (port != other.port) { - return false; - } - return true; - } -} \ No newline at end of file