summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
5d121f4)
I'm intentionally breaking these up into small groups so they can
be reasonably reviewed, rather than one giant group that can't.
Contributes to fixing bug 20.
Sixth set.
Change-Id: Iddab53b9e960a416c1416415daa6c00ebb1bfc96
Signed-off-by: Ed Warnicke <eaw@cisco.com>
import java.io.Serializable;
import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.opendaylight.controller.sal.action.Action;
import org.opendaylight.controller.sal.action.SetDlType;
import org.opendaylight.controller.sal.action.SetNwDst;
import org.opendaylight.controller.sal.action.Action;
import org.opendaylight.controller.sal.action.SetDlType;
import org.opendaylight.controller.sal.action.SetNwDst;
@Override
public int hashCode() {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ return result;
}
@Override
public boolean equals(Object obj) {
}
@Override
public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ContainerFlow other = (ContainerFlow) obj;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ return true;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
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;
-
/**
* The class represents the Name property of an element.
*/
/**
* The class represents the Name property of an element.
*/
@Override
public int hashCode() {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result
+ + ((description == null) ? 0 : description.hashCode());
+ return result;
}
@Override
public boolean equals(Object obj) {
}
@Override
public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Description other = (Description) obj;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ return true;
package org.opendaylight.controller.sal.core;
import java.io.Serializable;
package org.opendaylight.controller.sal.core;
import java.io.Serializable;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
@Override
public int hashCode() {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = 1;
+ result = prime
+ * result
+ + ((headNodeConnector == null) ? 0 : headNodeConnector
+ .hashCode());
+ result = prime
+ * result
+ + ((tailNodeConnector == null) ? 0 : tailNodeConnector
+ .hashCode());
+ return result;
}
@Override
public boolean equals(Object obj) {
}
@Override
public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Edge other = (Edge) obj;
+ if (headNodeConnector == null) {
+ if (other.headNodeConnector != null)
+ return false;
+ } else if (!headNodeConnector.equals(other.headNodeConnector))
+ return false;
+ if (tailNodeConnector == null) {
+ if (other.tailNodeConnector != null)
+ return false;
+ } else if (!tailNodeConnector.equals(other.tailNodeConnector))
+ return false;
+ return true;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.opendaylight.controller.sal.packet.address.DataLinkAddress;
@XmlRootElement(name="host")
import org.opendaylight.controller.sal.packet.address.DataLinkAddress;
@XmlRootElement(name="host")
@Override
public int hashCode() {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = 1;
+ result = prime
+ * result
+ + ((dataLayerAddress == null) ? 0 : dataLayerAddress.hashCode());
+ result = prime * result
+ + ((networkAddress == null) ? 0 : networkAddress.hashCode());
+ return result;
}
@Override
public boolean equals(Object obj) {
}
@Override
public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Host other = (Host) obj;
+ if (dataLayerAddress == null) {
+ if (other.dataLayerAddress != null)
+ return false;
+ } else if (!dataLayerAddress.equals(other.dataLayerAddress))
+ return false;
+ if (networkAddress == null) {
+ if (other.networkAddress != null)
+ return false;
+ } else if (!networkAddress.equals(other.networkAddress))
+ return false;
+ return true;
}
@Override
public String toString() {
}
@Override
public String toString() {
- return "Host[" + ReflectionToStringBuilder.toString(this) + "]";
+ return "Host [dataLayerAddress=" + dataLayerAddress
+ + ", networkAddress=" + networkAddress + "]";
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
/**
* @file Latency.java
*
/**
* @file Latency.java
*
@Override
public int hashCode() {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + (int) (latency ^ (latency >>> 32));
+ return result;
}
@Override
public boolean equals(Object obj) {
}
@Override
public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Latency other = (Latency) obj;
+ if (latency != other.latency)
+ return false;
+ return true;