| javax.media.jai.remote.Negotiable
All known Subclasses: javax.media.jai.remote.NegotiableCollection, javax.media.jai.remote.NegotiableNumeric, javax.media.jai.remote.NegotiableNumericRange,
Negotiable | public interface Negotiable extends Serializable(Code) | | An interface that defines objects that can be negotiated upon.
Negotiation amongst objects is performed using the
negotiate() method. This method can be used to
perform a chaining of successful negotiations, i.e., the results
of one successful negotiation can be used to negotiate with another
Negotiable and so on. In order to retrieve a single
negotiated value out of the Negotiable , the
getNegotiatedValue() method can be used at any point
during this series of negotiations.
since: JAI 1.1 |
Method Summary | |
Object | getNegotiatedValue() Returns a value that is valid for this Negotiable .
If more than one value is valid for this Negotiable ,
this method can choose one arbitrarily, e.g. | Class | getNegotiatedValueClass() Returns the Class of the object that would be returned
from the getNegotiatedValue method on a successful
negotiation. | Negotiable | negotiate(Negotiable other) Returns a Negotiable object that represents the
set intersection of this Negotiable with the
given Negotiable . |
getNegotiatedValue | Object getNegotiatedValue()(Code) | | Returns a value that is valid for this Negotiable .
If more than one value is valid for this Negotiable ,
this method can choose one arbitrarily, e.g. picking the first one
or by having static preferences amongst the valid values. Which of the
many valid values is returned is upto the particular implementation
of this method.
|
getNegotiatedValueClass | Class getNegotiatedValueClass()(Code) | | Returns the Class of the object that would be returned
from the getNegotiatedValue method on a successful
negotiation. This method can be used to learn what the
Class of the negotiated value will be if the negotiation
is successful. Implementing classes are encouraged to return an
accurate Class from this method if at all possible.
However it is permissible to return null, if the Class
of the negotiated value is indeterminate for any reason.
|
negotiate | Negotiable negotiate(Negotiable other)(Code) | | Returns a Negotiable object that represents the
set intersection of this Negotiable with the
given Negotiable . The returned Negotiable
represents the support that is common to both the
Negotiable s. If the negotiation fails, i.e there is
no common subset, null is returned.
If the supplied argument is null, negotiation will fail and
null will be returned, as it is not possible to negotiate with a
null value. It may, however, be noted that it is valid for
getNegotiatedValue() to return null, i.e the single
value result of the negotiation can be null.
Parameters: other - The Negotiable object to negotiate with. |
|
|