X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Futil%2FBitsType.java;h=c53df1bc6aa71259f030a996bc4259f2d8378518;hb=9b3f61b5b4ec4ee60eb931a256902bdf3c13968d;hp=6fa221df6e254e05218ea15381de4f6c1a6c5528;hpb=5c1f875f69e35248aa4115c429bd962160beeef4;p=yangtools.git diff --git a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BitsType.java b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BitsType.java index 6fa221df6e..c53df1bc6a 100644 --- a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BitsType.java +++ b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BitsType.java @@ -28,10 +28,9 @@ public final class BitsType implements BitsTypeDefinition { + "That is, a bits value is a set of flags identified by small integer position " + "numbers starting at 0. Each bit number has an assigned name."; - private final String reference = "https://tools.ietf.org/html/rfc6020#section-9.7"; - private final BitsTypeDefinition baseType; + private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.7"; private final List bits; - private final String units = ""; + private static final String UNITS = ""; /** * Default constructor.
@@ -43,7 +42,6 @@ public final class BitsType implements BitsTypeDefinition { super(); this.bits = Collections.emptyList(); this.path = path; - this.baseType = this; } /** @@ -56,7 +54,6 @@ public final class BitsType implements BitsTypeDefinition { super(); this.bits = Collections.unmodifiableList(bits); this.path = path; - this.baseType = this; } /* @@ -67,7 +64,7 @@ public final class BitsType implements BitsTypeDefinition { */ @Override public BitsTypeDefinition getBaseType() { - return baseType; + return null; } /* @@ -77,7 +74,7 @@ public final class BitsType implements BitsTypeDefinition { */ @Override public String getUnits() { - return units; + return UNITS; } /* @@ -130,7 +127,7 @@ public final class BitsType implements BitsTypeDefinition { */ @Override public String getReference() { - return reference; + return REFERENCE; } /* @@ -161,8 +158,6 @@ public final class BitsType implements BitsTypeDefinition { result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((path == null) ? 0 : path.hashCode()); - result = prime * result + ((reference == null) ? 0 : reference.hashCode()); - result = prime * result + ((units == null) ? 0 : units.hashCode()); return result; } @@ -206,20 +201,6 @@ public final class BitsType implements BitsTypeDefinition { } else if (!path.equals(other.path)) { return false; } - if (reference == null) { - if (other.reference != null) { - return false; - } - } else if (!reference.equals(other.reference)) { - return false; - } - if (units == null) { - if (other.units != null) { - return false; - } - } else if (!units.equals(other.units)) { - return false; - } return true; } @@ -233,11 +214,11 @@ public final class BitsType implements BitsTypeDefinition { builder.append(", description="); builder.append(description); builder.append(", reference="); - builder.append(reference); + builder.append(REFERENCE); builder.append(", bits="); builder.append(bits); builder.append(", units="); - builder.append(units); + builder.append(UNITS); builder.append("]"); return builder.toString(); }