-
- All Superinterfaces:
ValueConstraint
- All Known Implementing Classes:
ConstraintsImpl
public interface Constraints extends ValueConstraint
TheConstraintsinterface describes a collection of SNMP value range constraints.- Version:
- 1.0
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(Constraint constraint)Adds a range constraint to the constraints collection.Constraint[]getConstraints()Gets an array with the constraints in this collection ordered by insertion time.booleanisValidSize(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.voidremove(Constraint constraint)Removes a constraint.-
Methods inherited from interface org.snmp4j.agent.mo.snmp.smi.ValueConstraint
validate
-
-
-
-
Method Detail
-
add
void add(Constraint constraint)
Adds a range constraint to the constraints collection.- Parameters:
constraint- a SNMP integer/long value range constraint.
-
remove
void remove(Constraint constraint)
Removes a constraint.- Parameters:
constraint- a SNMP integer/long value range constraint.
-
getConstraints
Constraint[] getConstraints()
Gets an array with the constraints in this collection ordered by insertion time.- Returns:
- an array of
Constraintinstances.
-
isValidSize
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.- Parameters:
size- a long value representing an OCTET STRING size.- Returns:
trueif the size is valid.
-
-