import java.io.Serializable;
import java.util.Date;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.opendaylight.controller.sal.core.ContainerFlow;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.flowprogrammer.Flow;
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((flow == null) ? 0 : flow.hashCode());
+ result = prime * result
+ + ((flowName == null) ? 0 : flowName.hashCode());
+ result = prime * result
+ + ((groupName == null) ? 0 : groupName.hashCode());
+ result = prime * result + ((node == null) ? 0 : node.hashCode());
+ return result;
}
@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;
+ FlowEntry other = (FlowEntry) obj;
+ if (flow == null) {
+ if (other.flow != null)
+ return false;
+ } else if (!flow.equals(other.flow))
+ return false;
+ if (flowName == null) {
+ if (other.flowName != null)
+ return false;
+ } else if (!flowName.equals(other.flowName))
+ return false;
+ if (groupName == null) {
+ if (other.groupName != null)
+ return false;
+ } else if (!groupName.equals(other.groupName))
+ return false;
+ if (node == null) {
+ if (other.node != null)
+ return false;
+ } else if (!node.equals(other.node))
+ return false;
+ return true;
}
@Override
package org.opendaylight.controller.forwardingrulesmanager;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.opendaylight.controller.sal.core.ContainerFlow;
import org.opendaylight.controller.sal.core.Node;
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((cFlow == null) ? 0 : cFlow.hashCode());
+ result = prime * result + ((install == null) ? 0 : install.hashCode());
+ result = prime * result
+ + ((original == null) ? 0 : original.hashCode());
+ return result;
}
@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;
+ FlowEntryInstall other = (FlowEntryInstall) obj;
+ if (cFlow == null) {
+ if (other.cFlow != null)
+ return false;
+ } else if (!cFlow.equals(other.cFlow))
+ return false;
+ if (install == null) {
+ if (other.install != null)
+ return false;
+ } else if (!install.equals(other.install))
+ return false;
+ if (original == null) {
+ if (other.original != null)
+ return false;
+ } else if (!original.equals(other.original))
+ return false;
+ return true;
}
public String getFlowName() {
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.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.opendaylight.controller.sal.core.ConstructionException;
import org.opendaylight.controller.sal.core.Host;
return this;
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result
+ + ((nodeConnector == null) ? 0 : nodeConnector.hashCode());
+ result = prime * result + (staticHost ? 1231 : 1237);
+ result = prime * result + vlan;
+ return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@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;
+ HostNodeConnector other = (HostNodeConnector) obj;
+ if (nodeConnector == null) {
+ if (other.nodeConnector != null)
+ return false;
+ } else if (!nodeConnector.equals(other.nodeConnector))
+ return false;
+ if (staticHost != other.staticHost)
+ return false;
+ if (vlan != other.vlan)
+ return false;
+ return true;
}
public boolean equalsByIP(InetAddress networkAddress) {
package org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension;
import java.nio.ByteBuffer;
+import java.util.Arrays;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.openflow.protocol.OFError;
public class V6Error extends OFError {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + Arrays.hashCode(V6ErrorData);
+ result = prime * result + V6VendorErrorCode;
+ result = prime * result + V6VendorErrorType;
+ result = prime * result + V6VendorId;
+ return result;
}
@Override
public String toString() {
- return "V6Error[" + ReflectionToStringBuilder.toString(this) + "]";
+ return "V6Error [V6VendorId=" + V6VendorId + ", V6VendorErrorType="
+ + V6VendorErrorType + ", V6VendorErrorCode="
+ + V6VendorErrorCode + ", V6ErrorData="
+ + Arrays.toString(V6ErrorData) + ", errorType=" + errorType
+ + ", errorCode=" + errorCode + ", factory=" + factory
+ + ", error=" + Arrays.toString(error) + ", errorIsAscii="
+ + errorIsAscii + ", version=" + version + ", type=" + type
+ + ", length=" + length + ", xid=" + xid + "]";
}
@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;
+ V6Error other = (V6Error) obj;
+ if (!Arrays.equals(V6ErrorData, other.V6ErrorData))
+ return false;
+ if (V6VendorErrorCode != other.V6VendorErrorCode)
+ return false;
+ if (V6VendorErrorType != other.V6VendorErrorType)
+ return false;
+ if (V6VendorId != other.V6VendorId)
+ return false;
+ return true;
}
}
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((actions == null) ? 0 : actions.hashCode());
+ result = prime * result + (int) (byteCount ^ (byteCount >>> 32));
+ result = prime * result + (int) (cookie ^ (cookie >>> 32));
+ result = prime * result + durationNanoseconds;
+ result = prime * result + durationSeconds;
+ result = prime * result + hardAge;
+ result = prime * result + hardTimeout;
+ result = prime * result + idleAge;
+ result = prime * result + idleTimeout;
+ result = prime * result + length;
+ result = prime * result + ((match == null) ? 0 : match.hashCode());
+ result = prime * result + match_len;
+ result = prime * result + (int) (packetCount ^ (packetCount >>> 32));
+ result = prime * result + priority;
+ result = prime * result + tableId;
+ return result;
}
@Override
public String toString() {
- return "V6StatsReply[" + ReflectionToStringBuilder.toString(this) + "]";
+ return "V6StatsReply [length=" + length + ", tableId=" + tableId
+ + ", durationSeconds=" + durationSeconds
+ + ", durationNanoseconds=" + durationNanoseconds
+ + ", priority=" + priority + ", idleTimeout=" + idleTimeout
+ + ", hardTimeout=" + hardTimeout + ", match_len=" + match_len
+ + ", idleAge=" + idleAge + ", hardAge=" + hardAge + ", cookie="
+ + cookie + ", packetCount=" + packetCount + ", byteCount="
+ + byteCount + ", match=" + match + ", actions=" + actions + "]";
}
@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;
+ V6StatsReply other = (V6StatsReply) obj;
+ if (actions == null) {
+ if (other.actions != null)
+ return false;
+ } else if (!actions.equals(other.actions))
+ return false;
+ if (byteCount != other.byteCount)
+ return false;
+ if (cookie != other.cookie)
+ return false;
+ if (durationNanoseconds != other.durationNanoseconds)
+ return false;
+ if (durationSeconds != other.durationSeconds)
+ return false;
+ if (hardAge != other.hardAge)
+ return false;
+ if (hardTimeout != other.hardTimeout)
+ return false;
+ if (idleAge != other.idleAge)
+ return false;
+ if (idleTimeout != other.idleTimeout)
+ return false;
+ if (length != other.length)
+ return false;
+ if (match == null) {
+ if (other.match != null)
+ return false;
+ } else if (!match.equals(other.match))
+ return false;
+ if (match_len != other.match_len)
+ return false;
+ if (packetCount != other.packetCount)
+ return false;
+ if (priority != other.priority)
+ return false;
+ if (tableId != other.tableId)
+ return false;
+ return true;
}
}