|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.percederberg.mib.type.Constraint | +--net.percederberg.mib.type.ValueRangeConstraint
A class representing a value range constraint. Only the integer values of the numbers contained will be used.
Field Summary | |
static java.lang.Number |
MAX
The maximum unlimited value. |
static java.lang.Number |
MIN
The minimum unlimited value. |
Constructor Summary | |
ValueRangeConstraint(java.lang.Number lower,
boolean lowinc,
java.lang.Number upper,
boolean upinc)
Creates a new value range constraint from the given boundaries. |
|
ValueRangeConstraint(java.lang.Number lower,
java.lang.Number upper)
Creates a new value range constraint from the given boundaries. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Checks if this constraint equals another constraint. |
protected int |
maxValue()
Returns the maximum integer value for this constraint. |
protected int |
minValue()
Returns the minimum integer value for this constraint. |
java.lang.String |
toString()
Returns a string description of this constraint. |
void |
transferConstraint(TypeConverter converter)
Transfers the constraint information from this object to a type converter object. |
Methods inherited from class net.percederberg.mib.type.Constraint |
equalsValue |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.Number MIN
public static final java.lang.Number MAX
Constructor Detail |
public ValueRangeConstraint(java.lang.Number lower, java.lang.Number upper)
lower
- the lower boundary, or MIN for unlimitedupper
- the upper boundary, or MAX for unlimitedpublic ValueRangeConstraint(java.lang.Number lower, boolean lowinc, java.lang.Number upper, boolean upinc)
lower
- the lower boundary, or MIN for unlimitedlowinc
- true if lower boundary inclusive,
false otherwiseupper
- the upper boundary, or MAX for unlimitedupinc
- true if upper boundary inclusive,
false otherwiseMethod Detail |
public boolean equals(java.lang.Object obj)
equals
in class Constraint
obj
- the object to compare with
public java.lang.String toString()
toString
in class Constraint
public void transferConstraint(TypeConverter converter)
transferConstraint
in class Constraint
converter
- a type converterprotected int minValue()
protected int maxValue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |