Product SiteDocumentation Site

5.3.2.18. union


>>-union(argument)---------------------------------------------><

Returns a new collection of the same class as the receiver that contains all the items from the receiver collection and selected items from the argument collection. This method includes an item from argument in the new collection only if there is no item with the same associated index in the receiver collection and the method has not already included an item with the same index. The order in which this method selects items in argument is unspecified (the program should not rely on any order). The argument can be any collection class object. The argument must also allow all of the index values in the receiver collection.