Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bulk-add copyright headers to java files
[controller.git]
/
opendaylight
/
sal
/
api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
core
/
Tables.java
diff --git
a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Tables.java
b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Tables.java
index 4370c4c598aae44764bbc7d21bb356bf39bb68d9..724c8427f6edbe0003ed202930d0267cba04ede4 100644
(file)
--- a/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Tables.java
+++ b/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Tables.java
@@
-9,12
+9,11
@@
package org.opendaylight.controller.sal.core;
package org.opendaylight.controller.sal.core;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
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;
-
/**
* @file Tables.java
*
/**
* @file Tables.java
*
@@
-23,16
+22,17
@@
import org.apache.commons.lang3.builder.HashCodeBuilder;
* Describes supported # of datapath tables
*/
@XmlRootElement
* Describes supported # of datapath tables
*/
@XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
public class Tables extends Property {
public class Tables extends Property {
- private static final long serialVersionUID = 1L;
- @XmlElement
+
private static final long serialVersionUID = 1L;
+ @XmlElement
(name="value")
private byte tablesValue;
private byte tablesValue;
-
+
public static final String TablesPropName = "tables";
/**
* Construct a Tables property
*
public static final String TablesPropName = "tables";
/**
* Construct a Tables property
*
- * @param tables the Tables
+ * @param tables the Tables
* @return Constructed object
*/
public Tables(byte tables) {
* @return Constructed object
*/
public Tables(byte tables) {
@@
-48,6
+48,7
@@
public class Tables extends Property {
this.tablesValue = 0;
}
this.tablesValue = 0;
}
+ @Override
public Tables clone() {
return new Tables(this.tablesValue);
}
public Tables clone() {
return new Tables(this.tablesValue);
}
@@
-55,19
+56,36
@@
public class Tables extends Property {
public byte getValue() {
return this.tablesValue;
}
public byte getValue() {
return this.tablesValue;
}
-
+
@Override
public int hashCode() {
@Override
public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + tablesValue;
+ 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;
+ Tables other = (Tables) obj;
+ if (tablesValue != other.tablesValue)
+ return false;
+ return true;
}
@Override
public String toString() {
return "Tables[" + tablesValue + "]";
}
}
@Override
public String toString() {
return "Tables[" + tablesValue + "]";
}
+
+ @Override
+ public String getStringValue() {
+ return String.format("%02x", tablesValue);
+ }
}
}