|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.jai.remote.NegotiableCollection
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.
| Constructor Summary | |
NegotiableCollection(Collection collection)
Creates a NegotiableCollection given an
Collection. |
|
NegotiableCollection(Object[] objects)
Creates a NegotiableCollection given an array of
Objects. |
|
| Method Summary | |
Collection |
getCollection()
Returns the Collection of values which are currently
valid for this class, null if there are no valid values. |
Object |
getNegotiatedValue()
Returns a single value that is valid for this NegotiableCollection. |
Class |
getNegotiatedValueClass()
Returns the Class of the Object returned as the result
of the negotiation. |
Negotiable |
negotiate(Negotiable other)
Returns a NegotiableCollection that contains those
elements that are common to this NegotiableCollection
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 NegotiableCollection(Collection collection)
NegotiableCollection given an
Collection.
IllegalArgumentException - if collection is null.
IllegalArgumentException - if all the elements of collection
are not of the same Class type.public NegotiableCollection(Object[] objects)
NegotiableCollection given an array of
Objects. The elements of the Object
array are treated as being the elements of an Collection.
IllegalArgumentException - if objects is null.
IllegalArgumentException - if all the elements of objects are not
of the same Class type.| Method Detail |
public Collection getCollection()
Collection of values which are currently
valid for this class, null if there are no valid values.
public Negotiable negotiate(Negotiable other)
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.
negotiate in interface Negotiableother - The Negotiable to negotiate with.public Object getNegotiatedValue()
NegotiableCollection. The returned value is the first
element contained in this NegotiableCollection. Returns
null if there are no valid elements in this
NegotiableCollection.
getNegotiatedValue in interface Negotiablepublic Class getNegotiatedValueClass()
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.
getNegotiatedValueClass in interface Negotiable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||