|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.snmp.mibs.RangeList
The class represents the type of constraints defined in a MIB. These constraints take the shape of a set of enumerations or a set of ranges of type 1 | 3..5 | 7 . The constraints could either be on the length or the value and the appropriate parameter should be passed for verification. In case of a DisplayString (Size (1.255)) syntax the value which should be passed to the isValid method would be the length of the string and not the string itself which may or may not be a number.
| Field Summary | |
(package private) boolean |
addSizeTag
|
(package private) boolean |
isRanged
|
(package private) int |
labelcount
|
(package private) java.lang.String[] |
labels
|
(package private) long[] |
max
|
(package private) long[] |
min
|
(package private) boolean |
preDefinedRange
|
(package private) int |
rangecount
|
(package private) boolean[] |
rangetype
|
(package private) long[] |
values
|
| Constructor Summary | |
RangeList()
|
|
RangeList(int size,
boolean isEnumerated)
Create a range entity. |
|
| Method Summary | |
void |
addEnum(java.lang.String str,
long value)
Adds this enum to the RangeList |
void |
addRange(long rangeVal)
set the fixed value range |
void |
addRange(long mx,
long mn)
set the max and min range |
protected java.lang.Object |
clone()
|
void |
expandSize(int size,
boolean isRanged)
Expands the size of the list. |
int[] |
getEnumint()
Returns the array containing the enums |
int |
getEnumInt(java.lang.String enum)
Returns the int value for this enumeration string |
java.lang.String[] |
getEnumlabels()
Returns the array containing the enums |
(package private) RangeList |
getInstance(java.io.DataInputStream inp)
Extracts the rangeList item from the data stream and returns the object representing it. |
RangeList |
getInstance(java.io.DataInputStream inp,
RangeList range)
Extracts the rangeList item from the data stream. |
RangeList |
getInstance(RangeList synRan,
RangeList range)
|
java.lang.String |
getLabel(long val)
Returns the String label for the particular value |
(package private) boolean |
getRange(java.lang.String val)
|
boolean |
isEnumerated()
Indicates if this type is enumerated { other(1), iso8183(2)...} |
boolean |
isRanged()
Whether the syntax is Ranged (0 | 2..7 | 9 ) |
boolean |
isValid(long val)
to verify if the value is valid from the Mib. |
boolean |
isValid(java.lang.String val)
to verify if the string value is valid from the Mib. |
java.lang.String |
toString()
This method has been added to maintain some degree of compatibility for the displayed strings with the non-compiled versions. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
boolean isRanged
long[] values
java.lang.String[] labels
long[] max
long[] min
boolean[] rangetype
boolean preDefinedRange
boolean addSizeTag
int labelcount
int rangecount
| Constructor Detail |
public RangeList()
public RangeList(int size,
boolean isEnumerated)
size - The number of range elements or enumerationsisEnumerated - true if this will contain enumerations. false if
it will be set of range constraints.| Method Detail |
public java.lang.String[] getEnumlabels()
public int[] getEnumint()
public boolean isEnumerated()
public boolean isRanged()
public void addEnum(java.lang.String str,
long value)
public void addRange(long mx,
long mn)
public void addRange(long rangeVal)
public java.lang.String getLabel(long val)
val - the value for which the corresponding enumeration
is required.isValid.boolean getRange(java.lang.String val)
public int getEnumInt(java.lang.String enum)
enum - The enumeration stringpublic boolean isValid(long val)
public boolean isValid(java.lang.String val)
public java.lang.String toString()
public void expandSize(int size,
boolean isRanged)
RangeList getInstance(java.io.DataInputStream inp)
throws java.io.IOException
inp - DataInputStream for the compiled mib file. The descriptions
file is not required.
public RangeList getInstance(java.io.DataInputStream inp,
RangeList range)
throws java.io.IOException
public RangeList getInstance(RangeList synRan,
RangeList range)
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||