Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add intersection methods to Match
[controller.git]
/
opendaylight
/
sal
/
api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
match
/
MatchField.java
diff --git
a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/MatchField.java
b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/MatchField.java
index 4f3cbbd54b81967285e0dd2924bb1e57df2bb1f9..54be4c67189412a208dc5cfebb6fef2ff49f0301 100644
(file)
--- a/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/MatchField.java
+++ b/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/MatchField.java
@@
-9,7
+9,6
@@
package org.opendaylight.controller.sal.match;
import java.io.Serializable;
package org.opendaylight.controller.sal.match;
import java.io.Serializable;
-
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;
@@
-185,7
+184,8
@@
public class MatchField implements Cloneable, Serializable {
@Override
public String toString() {
@Override
public String toString() {
- return type + "(" + getValueString() + "," + getMaskString() + ")";
+ return (mask == null) ? String.format("%s(%s)", getTypeString(), getValueString()) :
+ String.format("%s(%s,%s)", getTypeString(), getValueString(), getMaskString());
}
@Override
}
@Override
@@
-208,6
+208,6
@@
public class MatchField implements Cloneable, Serializable {
if (type != other.type) {
return false;
}
if (type != other.type) {
return false;
}
- return
(type.equalValues(this.value, other.value) && type.equalMasks(this.mask, other.mask)
);
+ return
type.equals(this.value, other.value, this.mask, other.mask
);
}
}
}
}