### Class

# Gcr UnionCollection

since: 3

#### Description [src]

    class Gcr.UnionCollection : GObject.Object
      implements Gcr.Collection {
      /* No available fields */
    }

An implementation of `GcrCollection`, which combines the objects in other `GcrCollection`s. Use `gcr_union_collection_add()` to add and `gcr_union_collection_remove()` to remove them.

Available since: 3

#### Ancestors

- GObject

#### Implements

- GcrCollection

#### Constructors

###### gcr_union_collection_new

Create a new `GcrUnionCollection`.

since: 3

#### Instance methods

###### gcr_union_collection_add

Add objects from this collection to the union.

since: 3

###### gcr_union_collection_elements

Get the collections that have been added to this union.

since: 3

###### gcr_union_collection_have

Check whether the collection is present in the union.

since: 3

###### gcr_union_collection_remove

Remove an object from the collection.

since: 3

###### gcr_union_collection_size

Return the number of collections in this union. This does not reflect the number of objects in the combined collection.

since: 3

###### gcr_union_collection_take

Add objects from this collection to the union. Do not add an additional reference to the collection.

since: 3

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GcrCollection (5)

###### gcr_collection_contains

Check whether the collection contains an object or not.

since: 3

###### gcr_collection_emit_added

Emit the `GcrCollection::added` signal for the given object. This function is used by implementors of this interface.

since: 3

###### gcr_collection_emit_removed

Emit the `GcrCollection::removed` signal for the given object. This function is used by implementors of this interface.

since: 3

###### gcr_collection_get_length

Get the number of objects in this collection.

since: 3

###### gcr_collection_get_objects

Get a list of the objects in this collection.

since: 3

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0

##### Signals inherited from GcrCollection (2)

###### GcrCollection::added

This signal is emitted when an object is added to the collection.

since: 3

###### GcrCollection::removed

This signal is emitted when an object is removed from the collection.

since: 3

#### Class structure

    struct GcrUnionCollectionClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.