public class ValueRangeConstraint extends java.lang.Object implements Constraint
| Constructor and Description |
|---|
ValueRangeConstraint(FileLocation location,
MibValue lower,
boolean strictLower,
MibValue upper,
boolean strictUpper)
Creates a new value range constraint.
|
| Modifier and Type | Method and Description |
|---|---|
MibValue |
getLowerBound()
Returns the lower bound value.
|
MibValue |
getUpperBound()
Returns the upper bound value.
|
void |
initialize(MibType type,
MibLoaderLog log)
Initializes the constraint.
|
boolean |
isCompatible(MibType type)
Checks if the specified type is compatible with this
constraint.
|
boolean |
isCompatible(MibValue value)
Checks if the specified value is compatible with this
constraint.
|
boolean |
isCompatible(java.lang.Number value)
Checks if the specified value is compatible with this
constraint.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public ValueRangeConstraint(FileLocation location, MibValue lower, boolean strictLower, MibValue upper, boolean strictUpper)
location - the constraint locationlower - the lower bound, or null for minimumstrictLower - the strict lower bound (less than) flagupper - the upper bound, or null for maximumstrictUpper - the strict upper bound (greater than) flagpublic void initialize(MibType type, MibLoaderLog log) throws MibException
initialize in interface Constrainttype - the type to constrainlog - the MIB loader logMibException - if an error was encountered during the
initializationpublic boolean isCompatible(MibType type)
isCompatible in interface Constrainttype - the type to checkpublic boolean isCompatible(MibValue value)
isCompatible in interface Constraintvalue - the value to checkpublic boolean isCompatible(java.lang.Number value)
value - the value to checkpublic MibValue getLowerBound()
public MibValue getUpperBound()
public java.lang.String toString()
toString in class java.lang.Object