Convert size() functions in builtins to properties

Just like it will work itself out :)
This commit is contained in:
Denis Zharkov
2015-10-02 14:59:20 +03:00
parent a4d029dab2
commit 9d087ce5bd
2 changed files with 20 additions and 12 deletions
+4 -4
View File
@@ -49,7 +49,7 @@ public interface Collection<out E> : Iterable<E> {
/**
* Returns the size of the collection.
*/
public fun size(): Int
public val size: Int
/**
* Returns `true` if the collection is empty (contains no elements), `false` otherwise.
@@ -128,7 +128,7 @@ public interface MutableCollection<E> : Collection<E>, MutableIterable<E> {
*/
public interface List<out E> : Collection<E> {
// Query Operations
override fun size(): Int
override val size: Int
override fun isEmpty(): Boolean
override fun contains(o: Any?): Boolean
override fun iterator(): Iterator<E>
@@ -232,7 +232,7 @@ public interface MutableList<E> : List<E>, MutableCollection<E> {
*/
public interface Set<out E> : Collection<E> {
// Query Operations
override fun size(): Int
override val size: Int
override fun isEmpty(): Boolean
override fun contains(o: Any?): Boolean
override fun iterator(): Iterator<E>
@@ -274,7 +274,7 @@ public interface Map<K, out V> {
/**
* Returns the number of key/value pairs in the map.
*/
public fun size(): Int
public val size: Int
/**
* Returns `true` if the map is empty (contains no elements), `false` otherwise.