| java.lang.Object javax.media.jai.remote.NegotiableNumericRange
NegotiableNumericRange | public class NegotiableNumericRange implements Negotiable(Code) | | A class that wraps a Range which contains numeric elements,
to implement the Negotiable interface.
NegotiableNumericRange is a convenience class to specify a
Negotiable parameter whose valid numeric values are
specified by a Range .
since: JAI 1.1 |
Constructor Summary | |
public | NegotiableNumericRange(Range range) Creates a NegotiableNumericRange given an
Range containing elements of a subclass of
Number . |
Method Summary | |
public Object | getNegotiatedValue() Returns a single value that is valid for this
NegotiableNumericRange . | public Class | getNegotiatedValueClass() Returns the Class of the Object returned as the result
of the negotiation. | public Range | getRange() Returns the Range of values which are currently valid
for this class, null if there are no valid values. | public Negotiable | negotiate(Negotiable other) Returns a NegotiableNumericRange that contains the range
of values that are common to this NegotiableNumericRange
and the one supplied. |
NegotiableNumericRange | public NegotiableNumericRange(Range range)(Code) | | Creates a NegotiableNumericRange given an
Range containing elements of a subclass of
Number .
throws: IllegalArgumentException - if range is null. throws: IllegalArgumentException - if the elements of the supplied rangeare not a Number subclass. |
getNegotiatedValue | public Object getNegotiatedValue()(Code) | | Returns a single value that is valid for this
NegotiableNumericRange . The returned value is the lowest
value contained in this NegotiableNumericRange if the
range is not unbounded on the minimum end, or the highest value
in the range, if the range is unbounded on the minimum end. If both
ends are unbounded, 0 will be returned wrapped in the appropriate
Number wrapper. Returns null if there
are no valid elements in this NegotiableNumericRange .
|
getNegotiatedValueClass | public Class getNegotiatedValueClass()(Code) | | Returns the Class of the Object returned as the result
of the negotiation. This will be a subclass of Number .
|
getRange | public Range getRange()(Code) | | Returns the Range of values which are currently valid
for this class, null if there are no valid values.
|
negotiate | public Negotiable negotiate(Negotiable other)(Code) | | Returns a NegotiableNumericRange that contains the range
of values that are common to this NegotiableNumericRange
and the one supplied. If the supplied Negotiable is not
a NegotiableNumericRange with its elements being of the
same Class as this class', or if there is no common
range of values, the negotiation will fail and
null will be returned.
Parameters: other - The Negotiable to negotiate with. |
|
|