SourceForge.net Logo

org.netsnmp
Class NativeOID

java.lang.Object
  |
  +--org.netsnmp.NativeOID
All Implemented Interfaces:
Comparable, OID
Direct Known Subclasses:
DefaultOID

public abstract class NativeOID
extends Object
implements OID

OID class that supplies access to native OID services


Constructor Summary
NativeOID()
           
 
Method Summary
 OID append(OID oid)
          Creates a new OID object appending by appending oid to this one
 int compareTo(Object obj)
          Compare to another object.
 int compareTo(OID oid, int n)
          Compares up to n places in this oid
 String toString()
          Converts an oid to a dotted integer representation
 String toText()
          Converts an OID to a text representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.netsnmp.OID
length, oids
 

Constructor Detail

NativeOID

public NativeOID()
Method Detail

toString

public String toString()
Converts an oid to a dotted integer representation

Overrides:
toString in class Object

compareTo

public int compareTo(Object obj)
Compare to another object. Used for implementing the 'Comparable' interface for seaching and sorting

Specified by:
compareTo in interface Comparable
Parameters:
obj - Object to compare this OID to
Returns:
a negative integer, zero or a positive integer if this object is less than, equal to or greaten than the object it is being compared to.

compareTo

public int compareTo(OID oid,
                     int n)
Compares up to n places in this oid

Specified by:
compareTo in interface OID
Parameters:
oid - to compare this to
n - compare to n places
Returns:
a negative integer, zero or a positive integer if this object is less than, equal to or greaten than the OID it is being compared to to n places.

append

public OID append(OID oid)
Creates a new OID object appending by appending oid to this one

Specified by:
append in interface OID
Parameters:
oid - OID object append
Returns:
new OID that is the concatenation of this OID and the oid parameter

toText

public String toText()
Converts an OID to a text representation. Esentially calls snprint_objid and returns the result as a java.lang.String

Specified by:
toText in interface OID
Returns:
a text representation of the OID based on the currently loaded MIBs
See Also:
mib_api

SourceForge.net Logo