This method of the Delegate class contains the following signatures.
combine(Delegate delA, Delegate delB)
combine(Delegate[] rgDelegates)
combine(Delegate delTail)
This method of the Delegate class combines two Delegates to form a single Delegate. If both a and b are null, the result is null. If either a or b is null, the result is the non-null Delegate. If neither a nor b is null, the result is a new Delegate with an invocation list formed by concatenating the invocation lists of a and b, in that order. It is not considered an error for the invocation list to contain duplicate entries, that is, entries that refer to the same method on the same object. If neither a nor b is null, but a and b are of different actual types, an IllegalArgumentException is thrown. If neither a nor b is null, and a and b are of the same actual type, but that type doesn't derive from MulticastDelegate, a MulticastNotSupportedException exception is thrown.
public static final Delegate combine(Delegate delA, Delegate delB);
delA | One of the two Delegates. |
delB | One of the two Delegates. |
This method of the Delegate class combines the Delegates given by the Delegates array parameter to form a single Delegate with an invocation list consisting of the concatenation of the invocation lists of each of the Delegates in the array in order. The Delegates in the array must all be of the same actual type. The array can contain null entries, which are ignored. If the array parameter is null or empty, or if the resulting invocation list is empty, the result is null. If the Delegates in the array are not all the same actual type, an IllegalArgumentException is thrown. If the Delegates in the array are of a type that doesn't derive from MulticastDelegate, and if the resulting invocation list would have more than one entry, a MulticastNotSupportedException exception is thrown.
public static final Delegate combine(Delegate[] rgDelegates);
rgDelegates | A Delegate array. |
This method of the Delegate class combines this Delegate with the given Delegate. This method is overridden in the MulticastDelegate class to support multicasting.
protected Delegate combine(Delegate delTail) throws MulticastNotSupportedException;
delTail | A given Delegate. |