|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.snmp4j.agent.mo.snmp.smi.ConstraintsImpl
public class ConstraintsImpl
The ConstraintsImpl class represents a collection of constraints
that are applied to a SNMP value in the order they have been added to this
constraints collection.
| Constructor Summary | |
|---|---|
ConstraintsImpl()
Creates a new constraints collection. |
|
| Method Summary | |
|---|---|
void |
add(Constraint sizeConstraint)
Adds a range constraint to the constraints collection. |
Constraint[] |
getConstraints()
Gets an array with the constraints in this collection ordered by insertion time. |
boolean |
isValidSize(long size)
Interpretes the value range constraints contained in this collection as size restrictions for OCTET STRING values and checks whether the given size matches these criteria. |
void |
remove(Constraint sizeContraint)
Removes a constraint. |
int |
validate(org.snmp4j.smi.Variable variable)
Indicates whether a SNMP value matches this value constraint. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstraintsImpl()
| Method Detail |
|---|
public void add(Constraint sizeConstraint)
Constraints
add in interface ConstraintssizeConstraint - a SNMP integer/long value range constraint.public void remove(Constraint sizeContraint)
Constraints
remove in interface ConstraintssizeContraint - a SNMP integer/long value range constraint.public Constraint[] getConstraints()
Constraints
getConstraints in interface ConstraintsConstraint instances.public boolean isValidSize(long size)
Constraints
isValidSize in interface Constraintssize - a long value representing an OCTET STRING size.
true if the size is valid.public int validate(org.snmp4j.smi.Variable variable)
ValueConstraint
validate in interface ValueConstraintvariable - a SNMP value that has to match the type of SNMP value this
ValueConstraint supports. Otherwise a wrongType error
should be returned instead of throwing a
ClassCastException.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||