Interface Constraints

All Superinterfaces:
ValueConstraint
All Known Implementing Classes:
ConstraintsImpl

public interface Constraints extends ValueConstraint
The Constraints interface describes a collection of SNMP value range constraints.
Version:
1.0
Author:
Frank Fock
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Constraint constraint)
    Adds a range constraint to the constraints collection.
    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 constraint)
    Removes a constraint.

    Methods inherited from interface org.snmp4j.agent.mo.snmp.smi.ValueConstraint

    validate
  • Method Details

    • 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 Constraint instances.
    • 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:
      true if the size is valid.