public interface VarbindCollection extends Iterable<Varbind>
Varbind
objects resulting from
an SNMP operation. The collection supports both list-like and map-like
access methods.Modifier and Type | Method and Description |
---|---|
List<Varbind> |
asList()
Gets the contents of this collection as a immutable
List with
the same size and order as this collection. |
Map<String,Varbind> |
asMap()
Gets the contents of this collection as a immutable
Map indexed
using the same keys present in this collection. |
Varbind |
get(int index)
Gets a varbind from the collection.
|
Varbind |
get(String oid)
Gets a varbind from the collection.
|
Set<String> |
keySet()
Gets the set of keys (MIB names and/or dotted-decimal object identifiers
for which a varbind exists in this collection).
|
List<String> |
nextIdentifiers(List<String> oids)
Creates a list of object identifiers for a GETNEXT or GETBULK operation.
|
List<String> |
nextIdentifiers(String... oids)
Creates a list of object identifiers for a GETNEXT or GETBULK operation.
|
int |
size()
Gets the number of varbinds in this collection.
|
int size()
Set<String> keySet()
Varbind get(int index)
index
- zero-based index of the varbind to retrieveIndexOutOfBoundsException
- if index < 0
or
.Varbind get(String oid)
oid
- MIB name or dotted-decimal object identifier of the object
to retrieve; the specified value must be equal to one of values
passed to the SNMP operation that resulted in this varbind collectionnull
if no varbind exists with the given
nameList<Varbind> asList()
List
with
the same size and order as this collection.Map<String,Varbind> asMap()
Map
indexed
using the same keys present in this collection.List<String> nextIdentifiers(List<String> oids)
The resulting list is a concatenation of the specified oids
and
the object identifiers associated with the varbinds in this collection,
starting at index=oids.size()
. This method allows you to easily
construct a list of object identifiers where non-repeating objects
identifiers are specified in the given oids
and repeating object
identifiers are extracted from the previously retrieved varbinds.
oids
- array of object identifiers to prepend to the resulting listoids
followed by
the OIDS associated with the varbinds in this collection, starting
at start
.List<String> nextIdentifiers(String... oids)
The resulting list is a concatenation of the specified oids
and
the object identifiers associated with the varbinds in this collection,
starting at index=oids.size()
. This method allows you to easily
construct a list of object identifiers where non-repeating objects
identifiers are specified in the given oids
and repeating object
identifiers are extracted from the previously retrieved varbinds.
oids
- array of object identifiers to prepend to the resulting listoids
followed by
the OIDS associated with the varbinds in this collection, starting
at start
.Copyright © 2012–2015. All rights reserved.