/**
* The <code>default</code> implementation of Bits Type Definition interface.
- *
+ *
* @see BitsTypeDefinition
*/
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 static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.7";
private final BitsTypeDefinition baseType;
private final List<Bit> bits;
- private final String units = "";
+ private static final String UNITS = "";
/**
* Default constructor. <br>
* Instantiates Bits type as empty bits list.
- *
+ *
* @param path
*/
public BitsType(final SchemaPath path) {
/**
* Constructor with explicit definition of bits assigned to BitsType.
- *
+ *
* @param path
* @param bits
*/
/*
* (non-Javadoc)
- *
+ *
* @see
* org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
*/
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
*/
@Override
public String getUnits() {
- return units;
+ return UNITS;
}
/*
* (non-Javadoc)
- *
+ *
* @see
* org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
* ()
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see
* org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
*/
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
*/
@Override
public String getReference() {
- return reference;
+ return REFERENCE;
}
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
*/
@Override
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;
}
} 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;
}
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();
}