- java.lang.Object
-
- org.snmp4j.smi.SubIndexInfoImpl
-
- All Implemented Interfaces:
SubIndexInfo
public class SubIndexInfoImpl extends java.lang.Object implements SubIndexInfo
TheSubIndexInfoImplclass 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
Constructors Constructor Description SubIndexInfoImpl(boolean impliedLength, int minLength, int maxLength, int snmpSyntax)Create a sub index information object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxLength()Gets the maximum length in bytes of the sub-index.intgetMinLength()Gets the minimum length in bytes of the sub-index.intgetSnmpSyntax()Gets the SNMP syntax value of the sub-index' base syntax.booleanhasImpliedLength()Checks if the sub-index represented by this index info has an implied length or not.
-
-
-
Constructor Detail
-
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 Detail
-
hasImpliedLength
public boolean hasImpliedLength()
Description copied from interface:SubIndexInfoChecks if the sub-index represented by this index info has an implied length or not.- Specified by:
hasImpliedLengthin interfaceSubIndexInfo- Returns:
trueif 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:SubIndexInfoGets 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:
getMinLengthin interfaceSubIndexInfo- Returns:
- the minimum length of the (sub-index) in bytes.
-
getMaxLength
public int getMaxLength()
Description copied from interface:SubIndexInfoGets 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:
getMaxLengthin interfaceSubIndexInfo- Returns:
- the maximum length of the (sub-index) in bytes.
-
getSnmpSyntax
public int getSnmpSyntax()
Description copied from interface:SubIndexInfoGets the SNMP syntax value of the sub-index' base syntax.- Specified by:
getSnmpSyntaxin interfaceSubIndexInfo- Returns:
- the SNMP4J (BER) syntax identifier.
-
-