public class

SnmpIndex

extends Object
implements Serializable
java.lang.Object
   ↳ com.sun.jmx.snmp.agent.SnmpIndex

Class Overview

Represents a SNMP index. An SnmpIndex is represented as a Vector of SnmpOid.

This class is used internally and by the classes generated by mibgen. You should not need to use this class directly.

This API is a Sun Microsystems internal API and is subject to change without notice.

Summary

Public Constructors
SnmpIndex(SnmpOid[] oidList)
Initializes an SnmpIndex using a vector of object identifiers.
SnmpIndex(SnmpOid oid)
Initializes an SnmpIndex using the specified Object Identifier.
Public Methods
int compareTo(SnmpIndex index)
Compares two indexes.
boolean equals(SnmpIndex index)
Compares two indexes for equality.
Vector<SnmpOid> getComponents()
Gets the index as a vector of Object Identifiers.
int getNbComponents()
Gets the number of Object Identifiers the index is made of.
String toString()
Returns a String representation of the index.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SnmpIndex (SnmpOid[] oidList)

Initializes an SnmpIndex using a vector of object identifiers.

Following the RFC recommendations, every syntax that is used as a table index should have an object identifier representation. There are some guidelines on how to map the different syntaxes into an object identifier. In the different SnmpValue classes provided, there is a toOid method to get the object identifier of the value.

Parameters
oidList The list of Object Identifiers.

public SnmpIndex (SnmpOid oid)

Initializes an SnmpIndex using the specified Object Identifier.

Parameters
oid The Object Identifier.

Public Methods

public int compareTo (SnmpIndex index)

Compares two indexes.

Parameters
index The index to compare this with.
Returns
  • The value 0 if the two OID vectors have the same elements, another value otherwise.

public boolean equals (SnmpIndex index)

Compares two indexes for equality.

Parameters
index The index to compare this with.
Returns
  • true if the two indexes are equal, false otherwise.

public Vector<SnmpOid> getComponents ()

Gets the index as a vector of Object Identifiers.

Returns
  • The index as a vector.

public int getNbComponents ()

Gets the number of Object Identifiers the index is made of.

Returns
  • The number of Object Identifiers.

public String toString ()

Returns a String representation of the index. The different elements are separated by "//".

Returns
  • A string representation of the index.