|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.jai.remote.NegotiableNumericRange
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.
| Constructor Summary | |
NegotiableNumericRange(Range range)
Creates a NegotiableNumericRange given an
Range containing elements of a subclass of
Number. |
|
| Method Summary | |
Object |
getNegotiatedValue()
Returns a single value that is valid for this NegotiableNumericRange. |
Class |
getNegotiatedValueClass()
Returns the Class of the Object returned as the result
of the negotiation. |
Range |
getRange()
Returns the Range of values which are currently valid
for this class, null if there are no valid values. |
Negotiable |
negotiate(Negotiable other)
Returns a NegotiableNumericRange that contains the range
of values that are common to this NegotiableNumericRange
and the one supplied. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NegotiableNumericRange(Range range)
NegotiableNumericRange given an
Range containing elements of a subclass of
Number.
IllegalArgumentException - if range is null.
IllegalArgumentException - if the elements of the supplied range
are not a Number subclass.| Method Detail |
public Range getRange()
Range of values which are currently valid
for this class, null if there are no valid values.
public Negotiable negotiate(Negotiable other)
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.
negotiate in interface Negotiableother - The Negotiable to negotiate with.public Object getNegotiatedValue()
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.
getNegotiatedValue in interface Negotiablepublic Class getNegotiatedValueClass()
Class of the Object returned as the result
of the negotiation. This will be a subclass of Number.
getNegotiatedValueClass in interface Negotiable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||