Rather than using valueOf(), use exposed ZERO and MAX_VALUE,
improving initialization speed just a little.
Change-Id: Ib6938c039bdf8773d6000f9eb6b56cf8f01ae1d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
static final @NonNull BaseUint16Type INSTANCE = new BaseUint16Type();
private BaseUint16Type() {
static final @NonNull BaseUint16Type INSTANCE = new BaseUint16Type();
private BaseUint16Type() {
- super(BaseTypes.UINT16_QNAME, Uint16.valueOf(0), Uint16.valueOf(65535));
+ super(BaseTypes.UINT16_QNAME, Uint16.ZERO, Uint16.MAX_VALUE);
static final @NonNull BaseUint32Type INSTANCE = new BaseUint32Type();
private BaseUint32Type() {
static final @NonNull BaseUint32Type INSTANCE = new BaseUint32Type();
private BaseUint32Type() {
- super(BaseTypes.UINT32_QNAME, Uint32.valueOf(0), Uint32.valueOf(4294967295L));
+ super(BaseTypes.UINT32_QNAME, Uint32.ZERO, Uint32.MAX_VALUE);
static final @NonNull BaseUint64Type INSTANCE = new BaseUint64Type();
private BaseUint64Type() {
static final @NonNull BaseUint64Type INSTANCE = new BaseUint64Type();
private BaseUint64Type() {
- super(BaseTypes.UINT64_QNAME, Uint64.valueOf(0), Uint64.valueOf("18446744073709551615"));
+ super(BaseTypes.UINT64_QNAME, Uint64.ZERO, Uint64.MAX_VALUE);
static final @NonNull BaseUint8Type INSTANCE = new BaseUint8Type();
private BaseUint8Type() {
static final @NonNull BaseUint8Type INSTANCE = new BaseUint8Type();
private BaseUint8Type() {
- super(BaseTypes.UINT8_QNAME, Uint8.valueOf(0), Uint8.valueOf(255));
+ super(BaseTypes.UINT8_QNAME, Uint8.ZERO, Uint8.MAX_VALUE);