| java.lang.Object javax.media.jai.remote.NegotiableCollection
NegotiableCollection | public class NegotiableCollection implements Negotiable(Code) | | A class that wraps an Collection to implement the
Negotiable interface. NegotiableCollection
is a convenience class to specify a Negotiable value for
a parameter whose valid values are contained in an Collection .
since: JAI 1.1 |
Method Summary | |
public Collection | getCollection() Returns the Collection of values which are currently
valid for this class, null if there are no valid values. | public Object | getNegotiatedValue() Returns a single value that is valid for this
NegotiableCollection . | public Class | getNegotiatedValueClass() Returns the Class of the Object returned as the result
of the negotiation. | public Negotiable | negotiate(Negotiable other) Returns a NegotiableCollection that contains those
elements that are common to this NegotiableCollection
and the one supplied. |
NegotiableCollection | public NegotiableCollection(Object objects)(Code) | | Creates a NegotiableCollection given an array of
Object s. The elements of the Object
array are treated as being the elements of an Collection .
throws: IllegalArgumentException - if objects is null. throws: IllegalArgumentException - if all the elements of objects are notof the same Class type. |
getCollection | public Collection getCollection()(Code) | | Returns the Collection of values which are currently
valid for this class, null if there are no valid values.
|
getNegotiatedValue | public Object getNegotiatedValue()(Code) | | Returns a single value that is valid for this
NegotiableCollection . The returned value is the first
element contained in this NegotiableCollection . Returns
null if there are no valid elements in this
NegotiableCollection .
|
getNegotiatedValueClass | public Class getNegotiatedValueClass()(Code) | | Returns the Class of the Object returned as the result
of the negotiation. If the Collection used to construct
this NegotiableCollection was empty, i.e. had no
elements, the Class of the elements is indeterminate,
therefore null will be returned from this method in such a case.
|
negotiate | public Negotiable negotiate(Negotiable other)(Code) | | Returns a NegotiableCollection that contains those
elements that are common to this NegotiableCollection
and the one supplied. If the supplied Negotiable is not
a NegotiableCollection with its elements being of the
same Class as this class', or if there are no common
elements, the negotiation will fail and null (signifying
the failure of the negotiation) will be returned.
Parameters: other - The Negotiable to negotiate with. |
|
|