summaryrefslogtreecommitdiff
path: root/gee/multimap.vala
diff options
context:
space:
mode:
Diffstat (limited to 'gee/multimap.vala')
-rw-r--r--gee/multimap.vala30
1 files changed, 30 insertions, 0 deletions
diff --git a/gee/multimap.vala b/gee/multimap.vala
index 7b4aac2..01c158f 100644
--- a/gee/multimap.vala
+++ b/gee/multimap.vala
@@ -23,11 +23,18 @@
/**
* A map with multiple values per key.
*/
+[GenericAccessors]
public interface Gee.MultiMap<K,V> : Object {
/**
* The number of key/value pairs in this map.
*/
public abstract int size { get; }
+
+ /**
+ * Specifies whether this collection can change - i.e. wheather {@link set},
+ * {@link remove} etc. are legal operations.
+ */
+ public abstract bool read_only { get; }
/**
* Returns the keys of this multimap as a read-only set.
@@ -100,4 +107,27 @@ public interface Gee.MultiMap<K,V> : Object {
* Removes all items from this collection.
*/
public abstract void clear ();
+
+ /**
+ * Returns an iterator for this map.
+ *
+ * @return a map iterator
+ */
+ public abstract MapIterator<K, V> map_iterator ();
+
+ /**
+ * The type of the keys in this multimap.
+ */
+ public Type key_type { get { return typeof (K); } }
+
+ /**
+ * The type of the values in this multimap.
+ */
+ public Type value_type { get { return typeof (V); } }
+
+ public virtual MultiMap<K, V> read_only_view {
+ owned get {
+ return new ReadOnlyMultiMap<K, V> (this);
+ }
+ }
}