net.percederberg.mibble.snmp

## Class SnmpIndex

- java.lang.Object
- - net.percederberg.mibble.snmp.SnmpIndex

-     public class SnmpIndex
      extends java.lang.Object

  An SNMP index object. This declaration is used inside an object type index declaration. An index contains either a type or a value. Indices based on values may be implied.
  Since:
    2.6
  See Also:
    `SnmpObjectType`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SnmpIndex(boolean implied, MibValue value, MibType type)` Creates a new SNMP index.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MibType` | `getType()` Returns the index type if present.
    `java.lang.Object` | `getTypeOrValue()` Returns the index type or value.
    `MibValue` | `getValue()` Returns the index value if present.
    `boolean` | `isImplied()` Checks if this index is an implied value.
    `java.lang.String` | `toString()` Returns a string representation of this object.

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

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

- - ### Constructor Detail

    - #### SnmpIndex

          public SnmpIndex(boolean implied,
                   MibValue value,
                   MibType type)

      Creates a new SNMP index. Exactly one of the value or type arguments are supposed to be non-null.
      Parameters:
        `implied` - the implied flag
        `value` - the index value, or null
        `type` - the index type, or null

  - ### Method Detail

    - #### isImplied

          public boolean isImplied()

      Checks if this index is an implied value. If this is true, the index also represents a value index.
      Returns:
        true if the index is an implied value, or false otherwise

    - #### getValue

          public MibValue getValue()

      Returns the index value if present.
      Returns:
        the index value, or null if not applicable
      See Also:
        `getType()`

    - #### getType

          public MibType getType()

      Returns the index type if present.
      Returns:
        the index type, or null if not applicable
      See Also:
        `getValue()`

    - #### getTypeOrValue

          public java.lang.Object getTypeOrValue()

      Returns the index type or value.
      Returns:
        the index type or value
      See Also:
        `MibValue`, `MibType`

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of this object