X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fadsal%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fmatch%2Fextensible%2FDlType.java;fp=opendaylight%2Fadsal%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fmatch%2Fextensible%2FDlType.java;h=0000000000000000000000000000000000000000;hb=50f88249a65c52ba56a48852b71ce432fed2bbeb;hp=e2433aa23a16845cd1af86acf455daac0673f180;hpb=abfa9a03550cbe9fccc4420684dced175dd6d119;p=controller.git diff --git a/opendaylight/adsal/sal/api/src/main/java/org/opendaylight/controller/sal/match/extensible/DlType.java b/opendaylight/adsal/sal/api/src/main/java/org/opendaylight/controller/sal/match/extensible/DlType.java deleted file mode 100644 index e2433aa23a..0000000000 --- a/opendaylight/adsal/sal/api/src/main/java/org/opendaylight/controller/sal/match/extensible/DlType.java +++ /dev/null @@ -1,106 +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.EtherTypes; -import org.opendaylight.controller.sal.utils.NetUtils; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -@Deprecated -public class DlType extends MatchField { - private static final long serialVersionUID = 1L; - public static final String TYPE = "DL_TYPE"; - private short ethertype; - - /** - * Creates a Match field for the data layer type - * - * @param address - * the data layer type - */ - public DlType(short ethertype) { - super(TYPE); - this.ethertype = ethertype; - } - - // To satisfy JAXB - private DlType() { - super(TYPE); - } - - @Override - public Short getValue() { - return ethertype; - } - - @Override - @XmlElement(name = "value") - protected String getValueString() { - return String.format("0X%s", Integer.toHexString(NetUtils.getUnsignedShort(ethertype))); - } - - @Override - public Short getMask() { - return null; - } - - @Override - protected String getMaskString() { - return null; - } - - @Override - public boolean isValid() { - return true; - } - - @Override - public boolean hasReverse() { - return false; - } - - @Override - public DlType getReverse() { - return this.clone(); - } - - @Override - public DlType clone() { - return new DlType(ethertype); - } - - @Override - public boolean isV6() { - return this.ethertype == EtherTypes.IPv6.shortValue(); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ethertype; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!(obj instanceof DlType)) { - return false; - } - DlType other = (DlType) obj; - if (ethertype != other.ethertype) { - return false; - } - return true; - } -} \ No newline at end of file