IllegalValue
Constructor and Description |
---|
NumericIntervalRange() |
NumericIntervalRange(NumericInterval maxRange) |
NumericIntervalRange(NumericInterval maxRange,
boolean allowEmpty) |
Modifier and Type | Method and Description |
---|---|
NumericIntervalRange |
clone() |
void |
intersect(Range r)
Intersects the set of valid values of this Range with those of
another.
|
boolean |
isEmpty()
Returns true if this range is empty - i.e., if there are no valid
values.
|
boolean |
isValid(java.lang.Object obj,
StringHolder errMsg)
Returns true if the specified object is valid for this Range,
and false otherwise.
|
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter.
|
isWritable, makeValid, setError
public NumericIntervalRange()
public NumericIntervalRange(NumericInterval maxRange)
public NumericIntervalRange(NumericInterval maxRange, boolean allowEmpty)
public boolean isValid(java.lang.Object obj, StringHolder errMsg)
errMsg
is not null
, then errMsg.value
should
be set to a message describing why the object is not valid.public boolean isEmpty()
public void intersect(Range r)
Range.isEmpty()
should subsequently return true
.public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
write
.public void write(java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref) throws java.io.IOException
scan
and complete
enough to allow full reconstruction of the element.write
in interface Scannable
write
in class RangeBase
pw
- stream for writing the elementfmt
- numeric formating informationref
- optional reference object which can be used for producing references to
other objectsjava.io.IOException
- if an I/O error occuredpublic NumericIntervalRange clone()