|
| From: | Per Cederberg |
| Subject: | Re: [Mibble-users] Constraints |
| Date: | Thu, 09 Mar 2006 23:10:35 +0100 |
| User-agent: | Mozilla Thunderbird 1.0.7 (Macintosh/20050923) |
The MibTypes that support constraints provide methods
for accessing the constraint objects. See for example
the IntegerType:
http://www.mibble.org/doc/release/api/net/percederberg/mibble/type/IntegerType.html#getConstraint()
The idea is that you check for which type of constraint
you are dealing with by using instanceof
if (type instanceof IntegerType) {
intType = (IntegerType) type;
c = intType.getConstraint();
if (c instanceof ValueRangeConstraint) {
...
}
}
Check out the source code for the MibblePrinter if
you want a detailed example.
Note: If all you are looking for are the definitions
in an enumeration, check the Java API FAQ:
http://www.mibble.org/doc/faq/api/index.html#Q10
Cheers,
/Per
Krishan B Chandak wrote:
Hi, How can i get to know constraints(range or value) defined in the MIB. Thanks in advance, KB------------------------------------------------------------------------ _______________________________________________ Mibble-users mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/mibble-users
| [Prev in Thread] | Current Thread | [Next in Thread] |