HOME

com.ireasoning.protocol.snmp
Class SnmpVarBindList

java.lang.Object
  extended bycom.ireasoning.protocol.snmp.SnmpVarBindList
All Implemented Interfaces:
Serializable

public class SnmpVarBindList
extends Object
implements Serializable

This class implements a list which contains SnmpVarBind instances.

See Also:
Serialized Form

Constructor Summary
SnmpVarBindList()
          Default constructor
SnmpVarBindList(int size)
          Constructs an SnmpVarBindList with the specified size
 
Method Summary
 void add(SnmpVarBind varbind)
          Adds a new SnmpVarBind object
 void add(SnmpVarBind[] varbinds)
          Adds all elements in passed SnmpVarBind array
 void add(SnmpVarBindList varbindList)
          Adds all elements in passed SnmpVarBind array
 void clear()
          Resets this object.
 void clear(int offset)
          Removes all elemets starting from offset
 void ensureCapacity(int capacity)
          Ensures that the list has the specified capacity
 boolean equals(Object obj)
           
 SnmpVarBind get(int index)
          Returns the object at specified index
 int hashCode()
           
 boolean isEmpty()
          Tests if this list is empty or not
 SnmpVarBind remove(int index)
          Removes the element at the specified index
 void set(int index, SnmpVarBind newVal)
          Sets a new object at the specified index
 int size()
          Returns the number of elements contained in this list
 SnmpVarBind[] toArray()
          Converts to SnmpVarBind array
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpVarBindList

public SnmpVarBindList()
Default constructor


SnmpVarBindList

public SnmpVarBindList(int size)
Constructs an SnmpVarBindList with the specified size

Parameters:
size - the initial size. 0 is not allowed, it will be converted to default size.
Method Detail

add

public void add(SnmpVarBind varbind)
Adds a new SnmpVarBind object


get

public SnmpVarBind get(int index)
Returns the object at specified index

Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size()).

set

public void set(int index,
                SnmpVarBind newVal)
Sets a new object at the specified index

Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size()).

add

public void add(SnmpVarBind[] varbinds)
Adds all elements in passed SnmpVarBind array


ensureCapacity

public void ensureCapacity(int capacity)
Ensures that the list has the specified capacity


add

public void add(SnmpVarBindList varbindList)
Adds all elements in passed SnmpVarBind array


clear

public void clear()
Resets this object.


clear

public void clear(int offset)
Removes all elemets starting from offset

Parameters:
offset - the starting index of elements to be removed, inclusive.
Throws:
IndexOutOfBoundsException - if offset is out of range (offset < 0 || offset >= size()).

remove

public SnmpVarBind remove(int index)
Removes the element at the specified index

Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size()).

size

public int size()
Returns the number of elements contained in this list


isEmpty

public boolean isEmpty()
Tests if this list is empty or not

Returns:
true if this list has no element

toArray

public SnmpVarBind[] toArray()
Converts to SnmpVarBind array


equals

public boolean equals(Object obj)

hashCode

public int hashCode()

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.