java.lang.Object
org.snmp4j.smi.SubIndexInfoImpl
- All Implemented Interfaces:
SubIndexInfo
The
SubIndexInfoImpl
class represents the meta information of a SMI INDEX clause element (= sub-index)
which are relevant for converting an OID index value to an INDEX object and vice versa.- Since:
- 2.5.0
- Author:
- Frank Fock
-
Constructor Summary
ConstructorDescriptionSubIndexInfoImpl
(boolean impliedLength, int minLength, int maxLength, int snmpSyntax) Create a sub index information object. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the maximum length in bytes of the sub-index.int
Gets the minimum length in bytes of the sub-index.int
Gets the SNMP syntax value of the sub-index' base syntax.boolean
Checks if the sub-index represented by this index info has an implied length or not.
-
Constructor Details
-
SubIndexInfoImpl
public SubIndexInfoImpl(boolean impliedLength, int minLength, int maxLength, int snmpSyntax) Create a sub index information object.- Parameters:
impliedLength
- indicates if the sub-index value has an implied variable length (must apply to the last variable length sub-index only).minLength
- the minimum length in bytes of the sub-index value.maxLength
- the maximum length in bytes of the sub-index value.snmpSyntax
- the BER syntax of the sub-index object type's base syntax.
-
-
Method Details
-
hasImpliedLength
public boolean hasImpliedLength()Description copied from interface:SubIndexInfo
Checks if the sub-index represented by this index info has an implied length or not.- Specified by:
hasImpliedLength
in interfaceSubIndexInfo
- Returns:
true
if the length of this variable length sub-index is implied (i.e., the sub-index is the last in the index).
-
getMinLength
public int getMinLength()Description copied from interface:SubIndexInfo
Gets the minimum length in bytes of the sub-index. If min and max length are equal, then this sub-index is a fixed length length sub-index.- Specified by:
getMinLength
in interfaceSubIndexInfo
- Returns:
- the minimum length of the (sub-index) in bytes.
-
getMaxLength
public int getMaxLength()Description copied from interface:SubIndexInfo
Gets the maximum length in bytes of the sub-index. If min and max length are equal, then this sub-index is a fixed length length sub-index.- Specified by:
getMaxLength
in interfaceSubIndexInfo
- Returns:
- the maximum length of the (sub-index) in bytes.
-
getSnmpSyntax
public int getSnmpSyntax()Description copied from interface:SubIndexInfo
Gets the SNMP syntax value of the sub-index' base syntax.- Specified by:
getSnmpSyntax
in interfaceSubIndexInfo
- Returns:
- the SNMP4J (BER) syntax identifier.
-