fixing loxi output
upgrade to 0.3.8
agrregate pom for of-lib
Change-Id: Ie75d75b708c30934bbca235e68c50de656d84ad4
diff --git a/of/lib/src/main/java/org/projectfloodlight/openflow/types/U64.java b/of/lib/src/main/java/org/projectfloodlight/openflow/types/U64.java
index 1353b42..f15544f 100644
--- a/of/lib/src/main/java/org/projectfloodlight/openflow/types/U64.java
+++ b/of/lib/src/main/java/org/projectfloodlight/openflow/types/U64.java
@@ -151,6 +151,16 @@
return U64.of(raw ^ other.raw);
}
+ @Override
+ public U64 add(U64 other) {
+ return U64.of(this.raw + other.raw);
+ }
+
+ @Override
+ public U64 subtract(U64 other) {
+ return U64.of(this.raw - other.raw);
+ }
+
/** return the "numBits" highest-order bits of the hash.
* @param numBits number of higest-order bits to return [0-32].
* @return a numberic value of the 0-32 highest-order bits.
@@ -160,11 +170,6 @@
return HashValueUtils.prefixBits(raw, numBits);
}
- @Override
- public U64 combineWithValue(U64 value, int keyBits) {
- return U64.of(HashValueUtils.combineWithValue(this.raw, value.raw, keyBits));
- }
-
public final static Reader READER = new Reader();
private static class Reader implements OFMessageReader<U64> {
@@ -174,5 +179,59 @@
}
}
+ @Override
+ public HashValue.Builder<U64> builder() {
+ return new U64Builder(raw);
+ }
+
+ static class U64Builder implements Builder<U64> {
+ long raw;
+
+ public U64Builder(long raw) {
+ this.raw = raw;
+ }
+
+ @Override
+ public Builder<U64> add(U64 other) {
+ raw += other.raw;
+ return this;
+ }
+
+ @Override
+ public Builder<U64> subtract(
+ U64 other) {
+ raw -= other.raw;
+ return this;
+ }
+
+ @Override
+ public Builder<U64> invert() {
+ raw = ~raw;
+ return this;
+ }
+
+ @Override
+ public Builder<U64> or(U64 other) {
+ raw |= other.raw;
+ return this;
+ }
+
+ @Override
+ public Builder<U64> and(U64 other) {
+ raw &= other.raw;
+ return this;
+ }
+
+ @Override
+ public Builder<U64> xor(U64 other) {
+ raw ^= other.raw;
+ return this;
+ }
+
+ @Override
+ public U64 build() {
+ return U64.of(raw);
+ }
+ }
}