com.h3c.util.ip

## Class UnsignedLongBasedId

- java.lang.Object
- - com.h3c.util.cache.CacheableDataType
  - - com.h3c.util.ip.UnsignedId
    - - com.h3c.util.ip.UnsignedLongBasedId

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    U32Id

      public abstract class UnsignedLongBasedId
      extends UnsignedId

  A base class for unsigned identifiers with a long payload.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected long` | `id` The id.

    - ### Fields inherited from class com.h3c.util.ip.UnsignedId

      `E_BAD, E_NULL_BYTES, E_NULL_STR, E_OOR, MIN_VALUE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `UnsignedLongBasedId(long id)` Constructs the id.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `int` | `hashCode()`
    `long` | `toLong()` Returns this id as a long.
    `String` | `toString()` Returns a string representation of this id.

    - ### Methods inherited from class com.h3c.util.ip.UnsignedId

      `parseIntStr, parseLongStr`

    - ### Methods inherited from class com.h3c.util.cache.CacheableDataType

      `getRefQ, keyFromBytes`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### id

          protected final long id

      The id.

  - ### Constructor Detail

    - #### UnsignedLongBasedId

          protected UnsignedLongBasedId(long id)

      Constructs the id.
      Parameters:
        `id` - the id value

  - ### Method Detail

    - #### toString

          public String toString()

      Returns a string representation of this id. This default implementation expresses the value as a hex number, beginning with "0x...".
      Overrides:
        `toString` in class `Object`
      Returns:
        the id, as a string

    - #### toLong

          public long toLong()

      Returns this id as a long.
      Returns:
        this id as a long

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2014. All Rights Reserved.