Collection
Object Hierarchy:
Gee.Collection
Gee.Collection
Gee.Collection
Gee.Iterable
Gee.Iterable
Gee.Iterable->Gee.Collection
Description:
[
GenericAccessors ]
public interface Collection <
G > :
Iterable <
G >
A generic collection of objects.
All known implementing classes:
All known sub-interfaces:
Content:
Properties:
public virtual bool is_empty { get ; }
Specifies whether this collection is empty.
public abstract bool read_only { get ; }
Specifies whether this collection can change - i.e. whether
add , remove
etc. are legal operations.
public abstract Collection <G > read_only_view { owned get ; }
The read-only view of this collection.
public abstract int size { get ; }
The number of items in this collection.
Static methods:
Methods:
public abstract bool add (G item)
Adds an item to this collection. Must not be called on read-only
collections.
public virtual bool add_all (Collection <G > collection)
Adds all items in the input collection to this collection.
public virtual bool add_all_array (G [] array)
Adds all items in the input array to this collection.
public virtual bool add_all_iterator (Iterator <G > iter)
public abstract void clear ()
Removes all items from this collection. Must not be called on read-
only collections.
public abstract bool contains (G item)
Determines whether this collection contains the specified item.
public virtual bool contains_all (Collection <G > collection)
Returns true
it this collection contains all items as the
input collection.
public virtual bool contains_all_array (G [] array)
Returns true
it this collection contains all items as the
input array.
public virtual bool contains_all_iterator (Iterator <G > iter)
public abstract bool remove (G item)
Removes the first occurrence of an item from this collection. Must not
be called on read-only collections.
public virtual bool remove_all (Collection <G > collection)
Removes the subset of items in this collection corresponding to the
elements in the input collection. If there is several occurrences of the same value in this collection they are decremented of the
number of occurrences in the input collection.
public virtual bool remove_all_array (G [] array)
Removes the subset of items in this collection corresponding to the
elements in the input array. If there is several occurrences of the same value in this collection they are decremented of the number
of occurrences in the input array.
public virtual bool remove_all_iterator (Iterator <G > iter)
public virtual bool retain_all (Collection <G > collection)
Removes all items in this collection that are not contained in the
input collection. In other words all common items of both collections are retained in this collection.
public virtual G [] to_array ()
Returns an array containing all of items from this collection.
Inherited Members:
All known members inherited from interface Gee.Iterable