Interface ValueConstraint

All Known Subinterfaces:
Constraints
All Known Implementing Classes:
ConstraintsImpl, EnumerationConstraint

public interface ValueConstraint
A ValueConstraint instance validates the value ranges of a SNMP value to match a certain constraint.
Version:
1.0
Author:
Frank Fock
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    validate(org.snmp4j.smi.Variable variable)
    Indicates whether a SNMP value matches this value constraint.
  • Method Details

    • validate

      int validate(org.snmp4j.smi.Variable variable)
      Indicates whether a SNMP value matches this value constraint.
      Parameters:
      variable - 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.
      Returns:
      a SNMP error status (e.g. wrongValue) if the value does not match the constraint, or zero if it matches.