Java Code Examples for com.sun.jmx.snmp.SnmpOid#equals()

The following examples show how to use com.sun.jmx.snmp.SnmpOid#equals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SnmpIndex.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two indexes for equality.
 *
 * @param index The index to compare <CODE>this</CODE> with.
 *
 * @return <CODE>true</CODE> if the two indexes are equal, <CODE>false</CODE> otherwise.
 */
public boolean equals(SnmpIndex index) {

    if (size != index.getNbComponents())
        return false;

    // The two vectors have the same length.
    // Compare each single element ...
    //
    SnmpOid oid1;
    SnmpOid oid2;
    Vector<SnmpOid> components= index.getComponents();
    for(int i=0; i <size; i++) {
        oid1= oids.elementAt(i);
        oid2= components.elementAt(i);
        if (oid1.equals(oid2) == false)
            return false;
    }
    return true;
}
 
Example 2
Source File: SnmpIndex.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two indexes for equality.
 *
 * @param index The index to compare <CODE>this</CODE> with.
 *
 * @return <CODE>true</CODE> if the two indexes are equal, <CODE>false</CODE> otherwise.
 */
public boolean equals(SnmpIndex index) {

    if (size != index.getNbComponents())
        return false;

    // The two vectors have the same length.
    // Compare each single element ...
    //
    SnmpOid oid1;
    SnmpOid oid2;
    Vector<SnmpOid> components= index.getComponents();
    for(int i=0; i <size; i++) {
        oid1= oids.elementAt(i);
        oid2= components.elementAt(i);
        if (oid1.equals(oid2) == false)
            return false;
    }
    return true;
}
 
Example 3
Source File: SnmpIndex.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two indexes for equality.
 *
 * @param index The index to compare <CODE>this</CODE> with.
 *
 * @return <CODE>true</CODE> if the two indexes are equal, <CODE>false</CODE> otherwise.
 */
public boolean equals(SnmpIndex index) {

    if (size != index.getNbComponents())
        return false;

    // The two vectors have the same length.
    // Compare each single element ...
    //
    SnmpOid oid1;
    SnmpOid oid2;
    Vector<SnmpOid> components= index.getComponents();
    for(int i=0; i <size; i++) {
        oid1= oids.elementAt(i);
        oid2= components.elementAt(i);
        if (oid1.equals(oid2) == false)
            return false;
    }
    return true;
}
 
Example 4
Source File: SnmpIndex.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two indexes for equality.
 *
 * @param index The index to compare <CODE>this</CODE> with.
 *
 * @return <CODE>true</CODE> if the two indexes are equal, <CODE>false</CODE> otherwise.
 */
public boolean equals(SnmpIndex index) {

    if (size != index.getNbComponents())
        return false;

    // The two vectors have the same length.
    // Compare each single element ...
    //
    SnmpOid oid1;
    SnmpOid oid2;
    Vector<SnmpOid> components= index.getComponents();
    for(int i=0; i <size; i++) {
        oid1= oids.elementAt(i);
        oid2= components.elementAt(i);
        if (oid1.equals(oid2) == false)
            return false;
    }
    return true;
}
 
Example 5
Source File: SnmpIndex.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two indexes for equality.
 *
 * @param index The index to compare <CODE>this</CODE> with.
 *
 * @return <CODE>true</CODE> if the two indexes are equal, <CODE>false</CODE> otherwise.
 */
public boolean equals(SnmpIndex index) {

    if (size != index.getNbComponents())
        return false;

    // The two vectors have the same length.
    // Compare each single element ...
    //
    SnmpOid oid1;
    SnmpOid oid2;
    Vector<SnmpOid> components= index.getComponents();
    for(int i=0; i <size; i++) {
        oid1= oids.elementAt(i);
        oid2= components.elementAt(i);
        if (oid1.equals(oid2) == false)
            return false;
    }
    return true;
}
 
Example 6
Source File: SnmpRequestTree.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
    final int size = count;
    int low= 0;
    int max= size - 1;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        final SnmpOid pos = oids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        final int comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos)) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 7
Source File: SnmpMibTable.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Look for the given oid in the OID table (tableoids) and returns
 * its position.
 *
 * <p>
 * @param oid The OID we're looking for.
 *
 * @return The position of the OID in the table. -1 if the given
 *         OID was not found.
 *
 **/
private int findObject(SnmpOid oid) {
    int low= 0;
    int max= size - 1;
    SnmpOid pos;
    int comp;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        // XX pos = (SnmpOid) oids.elementAt(curr);
        pos = tableoids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos) == true) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 8
Source File: SnmpMibTable.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Look for the given oid in the OID table (tableoids) and returns
 * its position.
 *
 * <p>
 * @param oid The OID we're looking for.
 *
 * @return The position of the OID in the table. -1 if the given
 *         OID was not found.
 *
 **/
private int findObject(SnmpOid oid) {
    int low= 0;
    int max= size - 1;
    SnmpOid pos;
    int comp;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        // XX pos = (SnmpOid) oids.elementAt(curr);
        pos = tableoids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos) == true) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 9
Source File: SnmpMibTable.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Look for the given oid in the OID table (tableoids) and returns
 * its position.
 *
 * <p>
 * @param oid The OID we're looking for.
 *
 * @return The position of the OID in the table. -1 if the given
 *         OID was not found.
 *
 **/
private int findObject(SnmpOid oid) {
    int low= 0;
    int max= size - 1;
    SnmpOid pos;
    int comp;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        // XX pos = (SnmpOid) oids.elementAt(curr);
        pos = tableoids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos) == true) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 10
Source File: SnmpRequestTree.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
    final int size = count;
    int low= 0;
    int max= size - 1;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        final SnmpOid pos = oids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        final int comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos)) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 11
Source File: SnmpRequestTree.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
    final int size = count;
    int low= 0;
    int max= size - 1;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        final SnmpOid pos = oids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        final int comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos)) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 12
Source File: SnmpRequestTree.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
    final int size = count;
    int low= 0;
    int max= size - 1;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        final SnmpOid pos = oids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        final int comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos)) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 13
Source File: SnmpRequestTree.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
    final int size = count;
    int low= 0;
    int max= size - 1;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        final SnmpOid pos = oids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        final int comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos)) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 14
Source File: SnmpRequestTree.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
    final int size = count;
    int low= 0;
    int max= size - 1;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        final SnmpOid pos = oids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        final int comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos)) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 15
Source File: SnmpMibTable.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Look for the given oid in the OID table (tableoids) and returns
 * its position.
 *
 * <p>
 * @param oid The OID we're looking for.
 *
 * @return The position of the OID in the table. -1 if the given
 *         OID was not found.
 *
 **/
private int findObject(SnmpOid oid) {
    int low= 0;
    int max= size - 1;
    SnmpOid pos;
    int comp;
    int curr= low + (max-low)/2;
    //System.out.println("Try to retrieve: " + oid.toString());
    while (low <= max) {

        // XX pos = (SnmpOid) oids.elementAt(curr);
        pos = tableoids[curr];

        //System.out.println("Compare with" + pos.toString());
        // never know ...we might find something ...
        //
        comp = oid.compareTo(pos);
        if (comp == 0)
            return curr;

        if (oid.equals(pos) == true) {
            return curr;
        }
        if (comp > 0) {
            low = curr + 1;
        } else {
            max = curr - 1;
        }
        curr = low + (max-low)/2;
    }
    return -1;
}
 
Example 16
Source File: SnmpMibTable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get the <CODE>SnmpOid</CODE> index of the row that follows
 * the given <CODE>oid</CODE> in the table. The given <CODE>
 * oid</CODE> does not need to be a valid row OID index.
 *
 * <p>
 * @param oid The OID from which the search will begin.
 *
 * @param userData A contextual object containing user-data.
 *        This object is allocated through the <code>
 *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
 *        for each incoming SNMP request.
 *
 * @return The next <CODE>SnmpOid</CODE> index.
 *
 * @exception SnmpStatusException There is no index following the
 *     specified <CODE>oid</CODE> in the table.
 */
protected SnmpOid getNextOid(SnmpOid oid, Object userData)
    throws SnmpStatusException {

    if (size == 0) {
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    final SnmpOid resOid = oid;

    // Just a simple check to speed up retrieval of last element ...
    //
    // XX SnmpOid last= (SnmpOid) oids.lastElement();
    SnmpOid last= tableoids[tablecount-1];
    if (last.equals(resOid)) {
        // Last element of the table ...
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    // First find the oid. This will allow to speed up retrieval process
    // during smart discovery of table (using the getNext) as the
    // management station will use the valid index returned during a
    // previous getNext ...
    //

    // Returns the position following the position at which resOid
    // is found, or the position at which resOid should be inserted.
    //
    final int newPos = getInsertionPoint(resOid,false);

    // If the position returned is not out of bound, we will find
    // the next element in the array.
    //
    if (newPos > -1 && newPos < size) {
        try {
            // XX last = (SnmpOid) oids.elementAt(newPos);
            last = tableoids[newPos];
        } catch(ArrayIndexOutOfBoundsException e) {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        }
    } else {
        // We are dealing with the last element of the table ..
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }


    return last;
}
 
Example 17
Source File: SnmpMibTable.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get the <CODE>SnmpOid</CODE> index of the row that follows
 * the given <CODE>oid</CODE> in the table. The given <CODE>
 * oid</CODE> does not need to be a valid row OID index.
 *
 * <p>
 * @param oid The OID from which the search will begin.
 *
 * @param userData A contextual object containing user-data.
 *        This object is allocated through the <code>
 *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
 *        for each incoming SNMP request.
 *
 * @return The next <CODE>SnmpOid</CODE> index.
 *
 * @exception SnmpStatusException There is no index following the
 *     specified <CODE>oid</CODE> in the table.
 */
protected SnmpOid getNextOid(SnmpOid oid, Object userData)
    throws SnmpStatusException {

    if (size == 0) {
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    final SnmpOid resOid = oid;

    // Just a simple check to speed up retrieval of last element ...
    //
    // XX SnmpOid last= (SnmpOid) oids.lastElement();
    SnmpOid last= tableoids[tablecount-1];
    if (last.equals(resOid)) {
        // Last element of the table ...
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    // First find the oid. This will allow to speed up retrieval process
    // during smart discovery of table (using the getNext) as the
    // management station will use the valid index returned during a
    // previous getNext ...
    //

    // Returns the position following the position at which resOid
    // is found, or the position at which resOid should be inserted.
    //
    final int newPos = getInsertionPoint(resOid,false);

    // If the position returned is not out of bound, we will find
    // the next element in the array.
    //
    if (newPos > -1 && newPos < size) {
        try {
            // XX last = (SnmpOid) oids.elementAt(newPos);
            last = tableoids[newPos];
        } catch(ArrayIndexOutOfBoundsException e) {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        }
    } else {
        // We are dealing with the last element of the table ..
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }


    return last;
}
 
Example 18
Source File: SnmpMibTable.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get the <CODE>SnmpOid</CODE> index of the row that follows
 * the given <CODE>oid</CODE> in the table. The given <CODE>
 * oid</CODE> does not need to be a valid row OID index.
 *
 * <p>
 * @param oid The OID from which the search will begin.
 *
 * @param userData A contextual object containing user-data.
 *        This object is allocated through the <code>
 *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
 *        for each incoming SNMP request.
 *
 * @return The next <CODE>SnmpOid</CODE> index.
 *
 * @exception SnmpStatusException There is no index following the
 *     specified <CODE>oid</CODE> in the table.
 */
protected SnmpOid getNextOid(SnmpOid oid, Object userData)
    throws SnmpStatusException {

    if (size == 0) {
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    final SnmpOid resOid = oid;

    // Just a simple check to speed up retrieval of last element ...
    //
    // XX SnmpOid last= (SnmpOid) oids.lastElement();
    SnmpOid last= tableoids[tablecount-1];
    if (last.equals(resOid)) {
        // Last element of the table ...
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    // First find the oid. This will allow to speed up retrieval process
    // during smart discovery of table (using the getNext) as the
    // management station will use the valid index returned during a
    // previous getNext ...
    //

    // Returns the position following the position at which resOid
    // is found, or the position at which resOid should be inserted.
    //
    final int newPos = getInsertionPoint(resOid,false);

    // If the position returned is not out of bound, we will find
    // the next element in the array.
    //
    if (newPos > -1 && newPos < size) {
        try {
            // XX last = (SnmpOid) oids.elementAt(newPos);
            last = tableoids[newPos];
        } catch(ArrayIndexOutOfBoundsException e) {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        }
    } else {
        // We are dealing with the last element of the table ..
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }


    return last;
}
 
Example 19
Source File: SnmpMibTable.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get the <CODE>SnmpOid</CODE> index of the row that follows
 * the given <CODE>oid</CODE> in the table. The given <CODE>
 * oid</CODE> does not need to be a valid row OID index.
 *
 * <p>
 * @param oid The OID from which the search will begin.
 *
 * @param userData A contextual object containing user-data.
 *        This object is allocated through the <code>
 *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
 *        for each incoming SNMP request.
 *
 * @return The next <CODE>SnmpOid</CODE> index.
 *
 * @exception SnmpStatusException There is no index following the
 *     specified <CODE>oid</CODE> in the table.
 */
protected SnmpOid getNextOid(SnmpOid oid, Object userData)
    throws SnmpStatusException {

    if (size == 0) {
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    final SnmpOid resOid = oid;

    // Just a simple check to speed up retrieval of last element ...
    //
    // XX SnmpOid last= (SnmpOid) oids.lastElement();
    SnmpOid last= tableoids[tablecount-1];
    if (last.equals(resOid)) {
        // Last element of the table ...
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    // First find the oid. This will allow to speed up retrieval process
    // during smart discovery of table (using the getNext) as the
    // management station will use the valid index returned during a
    // previous getNext ...
    //

    // Returns the position following the position at which resOid
    // is found, or the position at which resOid should be inserted.
    //
    final int newPos = getInsertionPoint(resOid,false);

    // If the position returned is not out of bound, we will find
    // the next element in the array.
    //
    if (newPos > -1 && newPos < size) {
        try {
            // XX last = (SnmpOid) oids.elementAt(newPos);
            last = tableoids[newPos];
        } catch(ArrayIndexOutOfBoundsException e) {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        }
    } else {
        // We are dealing with the last element of the table ..
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }


    return last;
}
 
Example 20
Source File: SnmpMibTable.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get the <CODE>SnmpOid</CODE> index of the row that follows
 * the given <CODE>oid</CODE> in the table. The given <CODE>
 * oid</CODE> does not need to be a valid row OID index.
 *
 * <p>
 * @param oid The OID from which the search will begin.
 *
 * @param userData A contextual object containing user-data.
 *        This object is allocated through the <code>
 *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
 *        for each incoming SNMP request.
 *
 * @return The next <CODE>SnmpOid</CODE> index.
 *
 * @exception SnmpStatusException There is no index following the
 *     specified <CODE>oid</CODE> in the table.
 */
protected SnmpOid getNextOid(SnmpOid oid, Object userData)
    throws SnmpStatusException {

    if (size == 0) {
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    final SnmpOid resOid = oid;

    // Just a simple check to speed up retrieval of last element ...
    //
    // XX SnmpOid last= (SnmpOid) oids.lastElement();
    SnmpOid last= tableoids[tablecount-1];
    if (last.equals(resOid)) {
        // Last element of the table ...
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }

    // First find the oid. This will allow to speed up retrieval process
    // during smart discovery of table (using the getNext) as the
    // management station will use the valid index returned during a
    // previous getNext ...
    //

    // Returns the position following the position at which resOid
    // is found, or the position at which resOid should be inserted.
    //
    final int newPos = getInsertionPoint(resOid,false);

    // If the position returned is not out of bound, we will find
    // the next element in the array.
    //
    if (newPos > -1 && newPos < size) {
        try {
            // XX last = (SnmpOid) oids.elementAt(newPos);
            last = tableoids[newPos];
        } catch(ArrayIndexOutOfBoundsException e) {
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        }
    } else {
        // We are dealing with the last element of the table ..
        //
        throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
    }


    return last;
}