alshabib

fix for flow collisions

Change-Id: I07623fa06a5dbc1f36da021261f494f968fdf2f9
......@@ -161,7 +161,7 @@ public final class Criteria {
@Override
public int hashCode() {
return Objects.hash(port);
return Objects.hash(port, type());
}
@Override
......@@ -171,7 +171,8 @@ public final class Criteria {
}
if (obj instanceof PortCriterion) {
PortCriterion that = (PortCriterion) obj;
return Objects.equals(port, that.port);
return Objects.equals(port, that.port) &&
Objects.equals(this.type(), that.type());
}
return false;
......@@ -252,7 +253,7 @@ public final class Criteria {
@Override
public int hashCode() {
return Objects.hash(ethType);
return Objects.hash(ethType, type());
}
@Override
......@@ -262,7 +263,8 @@ public final class Criteria {
}
if (obj instanceof EthTypeCriterion) {
EthTypeCriterion that = (EthTypeCriterion) obj;
return Objects.equals(ethType, that.ethType);
return Objects.equals(ethType, that.ethType) &&
Objects.equals(this.type(), that.type());
}
......@@ -345,7 +347,7 @@ public final class Criteria {
@Override
public int hashCode() {
return Objects.hash(proto);
return Objects.hash(proto, type());
}
@Override
......@@ -400,7 +402,8 @@ public final class Criteria {
}
if (obj instanceof VlanPcpCriterion) {
VlanPcpCriterion that = (VlanPcpCriterion) obj;
return Objects.equals(vlanPcp, that.vlanPcp);
return Objects.equals(vlanPcp, that.vlanPcp) &&
Objects.equals(this.type(), that.type());
}
......@@ -436,7 +439,7 @@ public final class Criteria {
@Override
public int hashCode() {
return Objects.hash(vlanId);
return Objects.hash(vlanId, type());
}
@Override
......@@ -446,7 +449,8 @@ public final class Criteria {
}
if (obj instanceof VlanIdCriterion) {
VlanIdCriterion that = (VlanIdCriterion) obj;
return Objects.equals(vlanId, that.vlanId);
return Objects.equals(vlanId, that.vlanId) &&
Objects.equals(this.type(), that.type());
}
......
......@@ -78,7 +78,7 @@ public abstract class L2ModificationInstruction implements Instruction {
@Override
public int hashCode() {
return Objects.hash(mac, subtype);
return Objects.hash(mac, type(), subtype);
}
@Override
......@@ -89,6 +89,7 @@ public abstract class L2ModificationInstruction implements Instruction {
if (obj instanceof ModEtherInstruction) {
ModEtherInstruction that = (ModEtherInstruction) obj;
return Objects.equals(mac, that.mac) &&
Objects.equals(this.type(), that.type()) &&
Objects.equals(subtype, that.subtype);
}
......@@ -126,7 +127,7 @@ public abstract class L2ModificationInstruction implements Instruction {
@Override
public int hashCode() {
return Objects.hash(vlanId, subtype());
return Objects.hash(vlanId, type(), subtype());
}
@Override
......@@ -136,7 +137,9 @@ public abstract class L2ModificationInstruction implements Instruction {
}
if (obj instanceof ModVlanIdInstruction) {
ModVlanIdInstruction that = (ModVlanIdInstruction) obj;
return Objects.equals(vlanId, that.vlanId);
return Objects.equals(vlanId, that.vlanId) &&
Objects.equals(this.type(), that.type()) &&
Objects.equals(this.subtype(), that.subtype());
}
return false;
......@@ -173,7 +176,7 @@ public abstract class L2ModificationInstruction implements Instruction {
@Override
public int hashCode() {
return Objects.hash(vlanPcp, subtype());
return Objects.hash(vlanPcp, type(), subtype());
}
@Override
......@@ -183,7 +186,9 @@ public abstract class L2ModificationInstruction implements Instruction {
}
if (obj instanceof ModVlanPcpInstruction) {
ModVlanPcpInstruction that = (ModVlanPcpInstruction) obj;
return Objects.equals(vlanPcp, that.vlanPcp);
return Objects.equals(vlanPcp, that.vlanPcp) &&
Objects.equals(this.type(), that.type()) &&
Objects.equals(this.subtype(), that.subtype());
}
return false;
......
......@@ -70,7 +70,7 @@ public abstract class L3ModificationInstruction implements Instruction {
@Override
public int hashCode() {
return Objects.hash(ip, subtype());
return Objects.hash(ip, type(), subtype());
}
@Override
......@@ -80,7 +80,9 @@ public abstract class L3ModificationInstruction implements Instruction {
}
if (obj instanceof ModIPInstruction) {
ModIPInstruction that = (ModIPInstruction) obj;
return Objects.equals(ip, that.ip);
return Objects.equals(ip, that.ip) &&
Objects.equals(this.type(), that.type()) &&
Objects.equals(this.subtype(), that.subtype());
}
return false;
......