-
/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
package org.opendaylight.controller.sal.action;
+import java.util.Arrays;
+
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.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.opendaylight.controller.sal.utils.HexEncode;
/**
* Set destination datalayer address action
- *
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-
public class SetDlDst extends Action {
+ private static final long serialVersionUID = 1L;
private byte[] address;
/* Dummy constructor for JAXB */
- private SetDlDst () {
+ @SuppressWarnings("unused")
+ private SetDlDst() {
}
public SetDlDst(byte[] dlAddress) {
public byte[] getDlAddress() {
return address.clone();
}
-
+
@XmlElement(name = "address")
public String getDlAddressString() {
return HexEncode.bytesToHexString(address);
}
-
+
@Override
- public boolean equals(Object other) {
- return EqualsBuilder.reflectionEquals(this, other);
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ SetDlDst other = (SetDlDst) obj;
+ if (!Arrays.equals(address, other.address)) {
+ return false;
+ }
+ return true;
}
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + Arrays.hashCode(address);
+ return result;
}
@Override