public class SizeConstraint extends java.lang.Object implements Constraint
Constructor and Description |
---|
SizeConstraint(MibFileRef fileRef,
Constraint values)
Creates a new size constraint.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<Constraint> |
getValues()
Returns a list of the value constraints on the size.
|
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.
|
int |
nextValue(int start)
Returns the next compatible size constraint value from a start
value.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public SizeConstraint(MibFileRef fileRef, Constraint values)
fileRef
- the constraint MIB file locationvalues
- the constrained size valuespublic 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 java.util.ArrayList<Constraint> getValues()
public int nextValue(int start)
start
- the initial start valuepublic java.lang.String toString()
toString
in class java.lang.Object