com.h3c.util.snmp

## Class SnmpOid

- java.lang.Object
- - com.h3c.util.snmp.SnmpOid

-     public class SnmpOid
      extends Object

  SNMP OID value (immutable).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DOT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SnmpOid(int[] oidArray)`
    `SnmpOid(List<Long> oidArray)`
    `SnmpOid(long[] oidArray)`
    `SnmpOid(String oidString)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Long>` | `asList()`
    `String` | `asString()`
    `long` | `getLastIndex()` Returns the last index of the OID.
    `boolean` | `startsWith(SnmpOid baseOid)` Compare an OID with a base OID (prefix).
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DOT

          public static final String DOT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SnmpOid

          public SnmpOid(String oidString)

    - #### SnmpOid

          public SnmpOid(long[] oidArray)

    - #### SnmpOid

          public SnmpOid(int[] oidArray)

    - #### SnmpOid

          public SnmpOid(List<Long> oidArray)

  - ### Method Detail

    - #### asString

          public String asString()

    - #### asList

          public List<Long> asList()

    - #### getLastIndex

          public long getLastIndex()

      Returns the last index of the OID.
      Returns:
        last index of the OID or -1 if none is found.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### startsWith

          public boolean startsWith(SnmpOid baseOid)

      Compare an OID with a base OID (prefix).
      Parameters:
        `baseOid` - base OID (prefix)
      Returns:
        true if the OID starts with the base OID

Copyright © 2014. All Rights Reserved.