com.adventnet.snmp.mibs.mibparser
Class RangeList

java.lang.Object
  extended by com.adventnet.snmp.mibs.mibparser.RangeList

public class RangeList
extends java.lang.Object

This class is used for processing the range/size limitations of syntaxes.


Field Summary
(package private)  boolean enumerationFlag
           
 int labelcount
           
 java.lang.String[] labels
           
 long[] max
           
 long[] min
           
 boolean preDefinedRange
           
 int rangecount
           
(package private)  boolean rangeFlag
           
 boolean[] rangetype
           
 long[] values
           
 
Constructor Summary
RangeList(java.util.Vector enumList, java.util.Vector rangeList, java.util.Vector typeList)
           
 
Method Summary
 void addEnum(java.lang.String str, long value)
          Adds this enum to the RangeList
 void addEnums(java.util.Vector enumList)
           
 void addRange(long mx, long mn)
          set the max and min range
 void addRangeItem(long rangeVal)
          set the max and min range
 void addRanges(java.util.Vector rangeList, java.util.Vector typeList)
           
 java.lang.String getLabel(long val)
          Returns the String label for the particular value
 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 value is valid from the Mib.
 void writeElements(java.io.DataOutputStream outp, java.io.DataOutputStream descOutp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rangeFlag

boolean rangeFlag

enumerationFlag

boolean enumerationFlag

values

public long[] values

labelcount

public int labelcount

labels

public java.lang.String[] labels

max

public long[] max

rangecount

public int rangecount

min

public long[] min

rangetype

public boolean[] rangetype

preDefinedRange

public boolean preDefinedRange
Constructor Detail

RangeList

public RangeList(java.util.Vector enumList,
                 java.util.Vector rangeList,
                 java.util.Vector typeList)
Method Detail

isEnumerated

public boolean isEnumerated()
Indicates if this type is enumerated { other(1), iso8183(2)...}


isRanged

public boolean isRanged()
Whether the syntax is Ranged (0 | 2..7 | 9 )


addEnum

public void addEnum(java.lang.String str,
                    long value)
Adds this enum to the RangeList


addRange

public void addRange(long mx,
                     long mn)
set the max and min range


addRangeItem

public void addRangeItem(long rangeVal)
set the max and min range


addRanges

public void addRanges(java.util.Vector rangeList,
                      java.util.Vector typeList)

addEnums

public void addEnums(java.util.Vector enumList)

getLabel

public java.lang.String getLabel(long val)
Returns the String label for the particular value

Parameters:
val - the value for which the corresponding enumeration is required.
Returns:
string representation of the enumerated type. null if not present.
See Also:
isValid.

isValid

public boolean isValid(long val)
to verify if the value is valid from the Mib.


isValid

public boolean isValid(java.lang.String val)
to verify if the value is valid from the Mib.


writeElements

public void writeElements(java.io.DataOutputStream outp,
                          java.io.DataOutputStream descOutp)
                   throws java.io.IOException
Throws:
java.io.IOException