public class ValueConstraint extends java.lang.Object implements Constraint
Constructor and Description |
---|
ValueConstraint(MibFileRef fileRef,
MibValue value)
Creates a new value constraint.
|
Modifier and Type | Method and Description |
---|---|
MibValue |
getValue()
Returns the constraint 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.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public ValueConstraint(MibFileRef fileRef, MibValue value)
fileRef
- the constraint MIB file locationvalue
- the constraint valuepublic void initialize(MibType type, MibLoaderLog log) throws MibException
initialize
in interface Constraint
type
- the type to constrainlog
- the MIB loader logMibException
- if an error was encountered during the
initializationpublic boolean isCompatible(MibType type)
isCompatible
in interface Constraint
type
- the type to checkpublic boolean isCompatible(MibValue value)
isCompatible
in interface Constraint
value
- the value to checkpublic MibValue getValue()
public java.lang.String toString()
toString
in class java.lang.Object