[libgee/0.10] Override read_only_view property in ReadOnlySortedMap and its subclasses



commit cc9f91930ead2d76cc49de31721d005be5970aa4
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date:   Sat Sep 14 13:07:59 2013 +0200

    Override read_only_view property in ReadOnlySortedMap and its subclasses

 gee/readonlybidirsortedmap.vala |    9 +++++++++
 gee/readonlysortedmap.vala      |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gee/readonlybidirsortedmap.vala b/gee/readonlybidirsortedmap.vala
index 95c0327..e621ee6 100644
--- a/gee/readonlybidirsortedmap.vala
+++ b/gee/readonlybidirsortedmap.vala
@@ -46,6 +46,15 @@ internal class Gee.ReadOnlyBidirSortedMap<K,V> : ReadOnlySortedMap<K,V>, BidirSo
                return new BidirMapIterator<K,V> ((_map as BidirSortedMap<K,V>).bidir_map_iterator ());
        }
 
+       /**
+        * { inheritDoc}
+        */
+       public BidirSortedMap<K,V> read_only_view {
+               owned get {
+                       return this;
+               }
+       }
+
        protected class BidirMapIterator<K,V> : Gee.ReadOnlyMap.MapIterator<K,V>, Gee.BidirMapIterator<K,V> {
                public BidirMapIterator (Gee.BidirMapIterator<K,V> iterator) {
                        base (iterator);
diff --git a/gee/readonlysortedmap.vala b/gee/readonlysortedmap.vala
index 56d7fb6..d6e7b2b 100644
--- a/gee/readonlysortedmap.vala
+++ b/gee/readonlysortedmap.vala
@@ -77,5 +77,14 @@ internal class Gee.ReadOnlySortedMap<K,V> : ReadOnlyMap<K,V>, SortedMap<K,V> {
                        return (_map as SortedMap<K,V>).ascending_entries.read_only_view;
                }
        }
+
+       /**
+        * { inheritDoc}
+        */
+       public SortedMap<K, V> read_only_view {
+               owned get {
+                       return this;
+               }
+       }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]