org.snmp4j.agent.mo.snmp.smi
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
 void add(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.
 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 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 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.

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.