Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
61459961
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
61459961
编写于
10月 09, 2015
作者:
D
Denis Zharkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adjust stdlib to `isEmpty` transformation
上级
cfc9d198
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
32 addition
and
30 deletion
+32
-30
js/js.libraries/src/core/javautil.kt
js/js.libraries/src/core/javautil.kt
+2
-2
js/js.libraries/src/core/regex.kt
js/js.libraries/src/core/regex.kt
+1
-1
libraries/stdlib/src/generated/_Arrays.kt
libraries/stdlib/src/generated/_Arrays.kt
+8
-8
libraries/stdlib/src/kotlin/collections/JUtil.kt
libraries/stdlib/src/kotlin/collections/JUtil.kt
+1
-1
libraries/stdlib/src/kotlin/collections/MapWithDefault.kt
libraries/stdlib/src/kotlin/collections/MapWithDefault.kt
+2
-2
libraries/stdlib/src/kotlin/collections/Maps.kt
libraries/stdlib/src/kotlin/collections/Maps.kt
+1
-13
libraries/stdlib/src/kotlin/collections/MutableCollections.kt
...aries/stdlib/src/kotlin/collections/MutableCollections.kt
+14
-0
libraries/stdlib/src/kotlin/collections/Sets.kt
libraries/stdlib/src/kotlin/collections/Sets.kt
+1
-1
libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt
libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt
+1
-1
libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt
...aries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt
+1
-1
未找到文件。
js/js.libraries/src/core/javautil.kt
浏览文件 @
61459961
...
@@ -13,7 +13,7 @@ public interface Comparator<T> {
...
@@ -13,7 +13,7 @@ public interface Comparator<T> {
@
library
@
library
public
abstract
class
AbstractCollection
<
E
>()
:
MutableCollection
<
E
>
{
public
abstract
class
AbstractCollection
<
E
>()
:
MutableCollection
<
E
>
{
override
fun
isEmpty
():
Boolean
=
noImpl
override
val
isEmpty
:
Boolean
get
()
=
noImpl
override
fun
contains
(
o
:
E
):
Boolean
=
noImpl
override
fun
contains
(
o
:
E
):
Boolean
=
noImpl
override
fun
iterator
():
MutableIterator
<
E
>
=
noImpl
override
fun
iterator
():
MutableIterator
<
E
>
=
noImpl
...
@@ -103,7 +103,7 @@ public open class LinkedHashSet<E>(
...
@@ -103,7 +103,7 @@ public open class LinkedHashSet<E>(
@
library
@
library
public
open
class
HashMap
<
K
,
V
>(
initialCapacity
:
Int
=
DEFAULT_INITIAL_CAPACITY
,
loadFactor
:
Float
=
DEFAULT_LOAD_FACTOR
)
:
MutableMap
<
K
,
V
>
{
public
open
class
HashMap
<
K
,
V
>(
initialCapacity
:
Int
=
DEFAULT_INITIAL_CAPACITY
,
loadFactor
:
Float
=
DEFAULT_LOAD_FACTOR
)
:
MutableMap
<
K
,
V
>
{
override
val
size
:
Int
get
()
=
noImpl
override
val
size
:
Int
get
()
=
noImpl
override
fun
isEmpty
():
Boolean
=
noImpl
override
val
isEmpty
:
Boolean
get
()
=
noImpl
@Suppress
(
"BASE_WITH_NULLABLE_UPPER_BOUND"
)
@Suppress
(
"BASE_WITH_NULLABLE_UPPER_BOUND"
)
override
fun
get
(
key
:
Any
?):
V
?
=
noImpl
override
fun
get
(
key
:
Any
?):
V
?
=
noImpl
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
noImpl
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
noImpl
...
...
js/js.libraries/src/core/regex.kt
浏览文件 @
61459961
...
@@ -178,7 +178,7 @@ private fun RegExp.findNext(input: String, from: Int): MatchResult? {
...
@@ -178,7 +178,7 @@ private fun RegExp.findNext(input: String, from: Int): MatchResult? {
override
val
groups
:
MatchGroupCollection
=
object
:
MatchGroupCollection
{
override
val
groups
:
MatchGroupCollection
=
object
:
MatchGroupCollection
{
override
val
size
:
Int
get
()
=
match
.
size
()
override
val
size
:
Int
get
()
=
match
.
size
()
override
fun
isEmpty
():
Boolean
=
size
()
==
0
override
val
isEmpty
:
Boolean
get
()
=
size
()
==
0
override
fun
contains
(
o
:
MatchGroup
?):
Boolean
=
this
.
any
{
it
==
o
}
override
fun
contains
(
o
:
MatchGroup
?):
Boolean
=
this
.
any
{
it
==
o
}
override
fun
containsAll
(
c
:
Collection
<
MatchGroup
?
>):
Boolean
=
c
.
all
({
contains
(
it
)})
override
fun
containsAll
(
c
:
Collection
<
MatchGroup
?
>):
Boolean
=
c
.
all
({
contains
(
it
)})
...
...
libraries/stdlib/src/generated/_Arrays.kt
浏览文件 @
61459961
...
@@ -10175,7 +10175,7 @@ public fun <T> Array<out T>.asList(): List<T> {
...
@@ -10175,7 +10175,7 @@ public fun <T> Array<out T>.asList(): List<T> {
public
fun
BooleanArray
.
asList
():
List
<
Boolean
>
{
public
fun
BooleanArray
.
asList
():
List
<
Boolean
>
{
return
object
:
AbstractList
<
Boolean
>(),
RandomAccess
{
return
object
:
AbstractList
<
Boolean
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Boolean
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Boolean
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Boolean
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Boolean
>
override
fun
iterator
():
MutableIterator
<
Boolean
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Boolean
>
override
fun
get
(
index
:
Int
):
Boolean
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Boolean
=
this
@asList
[
index
]
...
@@ -10191,7 +10191,7 @@ public fun BooleanArray.asList(): List<Boolean> {
...
@@ -10191,7 +10191,7 @@ public fun BooleanArray.asList(): List<Boolean> {
public
fun
ByteArray
.
asList
():
List
<
Byte
>
{
public
fun
ByteArray
.
asList
():
List
<
Byte
>
{
return
object
:
AbstractList
<
Byte
>(),
RandomAccess
{
return
object
:
AbstractList
<
Byte
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Byte
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Byte
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Byte
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Byte
>
override
fun
iterator
():
MutableIterator
<
Byte
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Byte
>
override
fun
get
(
index
:
Int
):
Byte
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Byte
=
this
@asList
[
index
]
...
@@ -10207,7 +10207,7 @@ public fun ByteArray.asList(): List<Byte> {
...
@@ -10207,7 +10207,7 @@ public fun ByteArray.asList(): List<Byte> {
public
fun
CharArray
.
asList
():
List
<
Char
>
{
public
fun
CharArray
.
asList
():
List
<
Char
>
{
return
object
:
AbstractList
<
Char
>(),
RandomAccess
{
return
object
:
AbstractList
<
Char
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Char
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Char
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Char
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Char
>
override
fun
iterator
():
MutableIterator
<
Char
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Char
>
override
fun
get
(
index
:
Int
):
Char
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Char
=
this
@asList
[
index
]
...
@@ -10223,7 +10223,7 @@ public fun CharArray.asList(): List<Char> {
...
@@ -10223,7 +10223,7 @@ public fun CharArray.asList(): List<Char> {
public
fun
DoubleArray
.
asList
():
List
<
Double
>
{
public
fun
DoubleArray
.
asList
():
List
<
Double
>
{
return
object
:
AbstractList
<
Double
>(),
RandomAccess
{
return
object
:
AbstractList
<
Double
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Double
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Double
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Double
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Double
>
override
fun
iterator
():
MutableIterator
<
Double
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Double
>
override
fun
get
(
index
:
Int
):
Double
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Double
=
this
@asList
[
index
]
...
@@ -10239,7 +10239,7 @@ public fun DoubleArray.asList(): List<Double> {
...
@@ -10239,7 +10239,7 @@ public fun DoubleArray.asList(): List<Double> {
public
fun
FloatArray
.
asList
():
List
<
Float
>
{
public
fun
FloatArray
.
asList
():
List
<
Float
>
{
return
object
:
AbstractList
<
Float
>(),
RandomAccess
{
return
object
:
AbstractList
<
Float
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Float
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Float
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Float
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Float
>
override
fun
iterator
():
MutableIterator
<
Float
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Float
>
override
fun
get
(
index
:
Int
):
Float
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Float
=
this
@asList
[
index
]
...
@@ -10255,7 +10255,7 @@ public fun FloatArray.asList(): List<Float> {
...
@@ -10255,7 +10255,7 @@ public fun FloatArray.asList(): List<Float> {
public
fun
IntArray
.
asList
():
List
<
Int
>
{
public
fun
IntArray
.
asList
():
List
<
Int
>
{
return
object
:
AbstractList
<
Int
>(),
RandomAccess
{
return
object
:
AbstractList
<
Int
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Int
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Int
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Int
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Int
>
override
fun
iterator
():
MutableIterator
<
Int
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Int
>
override
fun
get
(
index
:
Int
):
Int
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Int
=
this
@asList
[
index
]
...
@@ -10271,7 +10271,7 @@ public fun IntArray.asList(): List<Int> {
...
@@ -10271,7 +10271,7 @@ public fun IntArray.asList(): List<Int> {
public
fun
LongArray
.
asList
():
List
<
Long
>
{
public
fun
LongArray
.
asList
():
List
<
Long
>
{
return
object
:
AbstractList
<
Long
>(),
RandomAccess
{
return
object
:
AbstractList
<
Long
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Long
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Long
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Long
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Long
>
override
fun
iterator
():
MutableIterator
<
Long
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Long
>
override
fun
get
(
index
:
Int
):
Long
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Long
=
this
@asList
[
index
]
...
@@ -10287,7 +10287,7 @@ public fun LongArray.asList(): List<Long> {
...
@@ -10287,7 +10287,7 @@ public fun LongArray.asList(): List<Long> {
public
fun
ShortArray
.
asList
():
List
<
Short
>
{
public
fun
ShortArray
.
asList
():
List
<
Short
>
{
return
object
:
AbstractList
<
Short
>(),
RandomAccess
{
return
object
:
AbstractList
<
Short
>(),
RandomAccess
{
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
val
size
:
Int
get
()
=
this
@asList
.
size
()
override
fun
isEmpty
():
Boolean
=
this
@asList
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
this
@asList
.
isEmpty
()
override
fun
contains
(
o
:
Short
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
contains
(
o
:
Short
):
Boolean
=
this
@asList
.
contains
(
o
)
override
fun
iterator
():
MutableIterator
<
Short
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Short
>
override
fun
iterator
():
MutableIterator
<
Short
>
=
this
@asList
.
iterator
()
as
MutableIterator
<
Short
>
override
fun
get
(
index
:
Int
):
Short
=
this
@asList
[
index
]
override
fun
get
(
index
:
Int
):
Short
=
this
@asList
[
index
]
...
...
libraries/stdlib/src/kotlin/collections/JUtil.kt
浏览文件 @
61459961
...
@@ -21,7 +21,7 @@ internal object EmptyList : List<Nothing>, Serializable {
...
@@ -21,7 +21,7 @@ internal object EmptyList : List<Nothing>, Serializable {
override
fun
toString
():
String
=
"[]"
override
fun
toString
():
String
=
"[]"
override
val
size
:
Int
get
()
=
0
override
val
size
:
Int
get
()
=
0
override
fun
isEmpty
():
Boolean
=
true
override
val
isEmpty
:
Boolean
get
()
=
true
override
fun
contains
(
o
:
Nothing
):
Boolean
=
false
override
fun
contains
(
o
:
Nothing
):
Boolean
=
false
override
fun
containsAll
(
c
:
Collection
<
Nothing
>):
Boolean
=
c
.
isEmpty
()
override
fun
containsAll
(
c
:
Collection
<
Nothing
>):
Boolean
=
c
.
isEmpty
()
...
...
libraries/stdlib/src/kotlin/collections/MapWithDefault.kt
浏览文件 @
61459961
...
@@ -65,7 +65,7 @@ private class MapWithDefaultImpl<K, out V>(public override val map: Map<K,V>, pr
...
@@ -65,7 +65,7 @@ private class MapWithDefaultImpl<K, out V>(public override val map: Map<K,V>, pr
override
fun
hashCode
():
Int
=
map
.
hashCode
()
override
fun
hashCode
():
Int
=
map
.
hashCode
()
override
fun
toString
():
String
=
map
.
toString
()
override
fun
toString
():
String
=
map
.
toString
()
override
val
size
:
Int
get
()
=
map
.
size
()
override
val
size
:
Int
get
()
=
map
.
size
()
override
fun
isEmpty
():
Boolean
=
map
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
map
.
isEmpty
()
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
map
.
containsKey
(
key
)
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
map
.
containsKey
(
key
)
override
fun
containsValue
(
value
:
Any
?):
Boolean
=
map
.
containsValue
(
value
)
override
fun
containsValue
(
value
:
Any
?):
Boolean
=
map
.
containsValue
(
value
)
override
fun
get
(
key
:
Any
?):
V
?
=
map
.
get
(
key
)
override
fun
get
(
key
:
Any
?):
V
?
=
map
.
get
(
key
)
...
@@ -81,7 +81,7 @@ private class MutableMapWithDefaultImpl<K, V>(public override val map: MutableMa
...
@@ -81,7 +81,7 @@ private class MutableMapWithDefaultImpl<K, V>(public override val map: MutableMa
override
fun
hashCode
():
Int
=
map
.
hashCode
()
override
fun
hashCode
():
Int
=
map
.
hashCode
()
override
fun
toString
():
String
=
map
.
toString
()
override
fun
toString
():
String
=
map
.
toString
()
override
val
size
:
Int
get
()
=
map
.
size
()
override
val
size
:
Int
get
()
=
map
.
size
()
override
fun
isEmpty
():
Boolean
=
map
.
isEmpty
()
override
val
isEmpty
:
Boolean
get
()
=
map
.
isEmpty
()
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
map
.
containsKey
(
key
)
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
map
.
containsKey
(
key
)
override
fun
containsValue
(
value
:
Any
?):
Boolean
=
map
.
containsValue
(
value
)
override
fun
containsValue
(
value
:
Any
?):
Boolean
=
map
.
containsValue
(
value
)
override
fun
get
(
key
:
Any
?):
V
?
=
map
.
get
(
key
)
override
fun
get
(
key
:
Any
?):
V
?
=
map
.
get
(
key
)
...
...
libraries/stdlib/src/kotlin/collections/Maps.kt
浏览文件 @
61459961
...
@@ -12,7 +12,7 @@ private object EmptyMap : Map<Any, Nothing>, Serializable {
...
@@ -12,7 +12,7 @@ private object EmptyMap : Map<Any, Nothing>, Serializable {
override
fun
toString
():
String
=
"{}"
override
fun
toString
():
String
=
"{}"
override
val
size
:
Int
get
()
=
0
override
val
size
:
Int
get
()
=
0
override
fun
isEmpty
():
Boolean
=
true
override
val
isEmpty
:
Boolean
get
()
=
true
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
false
override
fun
containsKey
(
key
:
Any
?):
Boolean
=
false
override
fun
containsValue
(
value
:
Any
?):
Boolean
=
false
override
fun
containsValue
(
value
:
Any
?):
Boolean
=
false
...
@@ -103,18 +103,6 @@ public fun <K,V> Map<K,V>?.orEmpty() : Map<K,V> = this ?: emptyMap()
...
@@ -103,18 +103,6 @@ public fun <K,V> Map<K,V>?.orEmpty() : Map<K,V> = this ?: emptyMap()
*/
*/
public
operator
fun
<
K
,
V
>
Map
<
K
,
V
>.
contains
(
key
:
K
)
:
Boolean
=
containsKey
(
key
)
public
operator
fun
<
K
,
V
>
Map
<
K
,
V
>.
contains
(
key
:
K
)
:
Boolean
=
containsKey
(
key
)
/**
* Allows to access the key of a map entry as a property. Equivalent to `getKey()`.
*/
public
val
<
K
,
V
>
Map
.
Entry
<
K
,
V
>.
key
:
K
get
()
=
getKey
()
/**
* Allows to access the value of a map entry as a property. Equivalent to `getValue()`.
*/
public
val
<
K
,
V
>
Map
.
Entry
<
K
,
V
>.
value
:
V
get
()
=
getValue
()
/**
/**
* Returns the key component of the map entry.
* Returns the key component of the map entry.
*
*
...
...
libraries/stdlib/src/kotlin/collections/MutableCollections.kt
浏览文件 @
61459961
...
@@ -5,9 +5,23 @@ package kotlin
...
@@ -5,9 +5,23 @@ package kotlin
@Deprecated
(
"Use property `size` instead"
,
ReplaceWith
(
"this.size"
))
@Deprecated
(
"Use property `size` instead"
,
ReplaceWith
(
"this.size"
))
public
inline
fun
Collection
<*>.
size
()
=
size
public
inline
fun
Collection
<*>.
size
()
=
size
@Deprecated
(
"Use property `size` instead"
,
ReplaceWith
(
"this.size"
))
@Deprecated
(
"Use property `size` instead"
,
ReplaceWith
(
"this.size"
))
public
inline
fun
Map
<*,
*>.
size
()
=
size
public
inline
fun
Map
<*,
*>.
size
()
=
size
@Deprecated
(
"Use property `isEmpty` instead"
,
ReplaceWith
(
"this.isEmpty"
))
public
inline
fun
Collection
<*>.
isEmpty
()
=
isEmpty
@Deprecated
(
"Use property `isEmpty` instead"
,
ReplaceWith
(
"this.isEmpty"
))
public
inline
fun
Map
<*,
*>.
isEmpty
()
=
isEmpty
@Deprecated
(
"Use property `key` instead"
,
ReplaceWith
(
"this.key"
))
public
fun
<
K
,
V
>
Map
.
Entry
<
K
,
V
>.
getKey
():
K
=
key
@Deprecated
(
"Use property `value` instead"
,
ReplaceWith
(
"this.value"
))
public
fun
<
K
,
V
>
Map
.
Entry
<
K
,
V
>.
getValue
():
V
=
value
/**
/**
* Adds the specified [element] to this mutable collection.
* Adds the specified [element] to this mutable collection.
*/
*/
...
...
libraries/stdlib/src/kotlin/collections/Sets.kt
浏览文件 @
61459961
...
@@ -13,7 +13,7 @@ internal object EmptySet : Set<Nothing>, Serializable {
...
@@ -13,7 +13,7 @@ internal object EmptySet : Set<Nothing>, Serializable {
override
fun
toString
():
String
=
"[]"
override
fun
toString
():
String
=
"[]"
override
val
size
:
Int
get
()
=
0
override
val
size
:
Int
get
()
=
0
override
fun
isEmpty
():
Boolean
=
true
override
val
isEmpty
:
Boolean
get
()
=
true
override
fun
contains
(
o
:
Nothing
):
Boolean
=
false
override
fun
contains
(
o
:
Nothing
):
Boolean
=
false
override
fun
containsAll
(
c
:
Collection
<
Nothing
>):
Boolean
=
c
.
isEmpty
()
override
fun
containsAll
(
c
:
Collection
<
Nothing
>):
Boolean
=
c
.
isEmpty
()
...
...
libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt
浏览文件 @
61459961
...
@@ -221,7 +221,7 @@ private class MatcherMatchResult(private val matcher: Matcher, private val input
...
@@ -221,7 +221,7 @@ private class MatcherMatchResult(private val matcher: Matcher, private val input
override
val
groups
:
MatchGroupCollection
=
object
:
MatchGroupCollection
{
override
val
groups
:
MatchGroupCollection
=
object
:
MatchGroupCollection
{
override
val
size
:
Int
get
()
=
matchResult
.
groupCount
()
+
1
override
val
size
:
Int
get
()
=
matchResult
.
groupCount
()
+
1
override
fun
isEmpty
():
Boolean
=
false
override
val
isEmpty
:
Boolean
get
()
=
false
override
fun
contains
(
o
:
MatchGroup
?):
Boolean
=
this
.
any
({
it
==
o
})
override
fun
contains
(
o
:
MatchGroup
?):
Boolean
=
this
.
any
({
it
==
o
})
override
fun
containsAll
(
c
:
Collection
<
MatchGroup
?
>):
Boolean
=
c
.
all
({
contains
(
it
)})
override
fun
containsAll
(
c
:
Collection
<
MatchGroup
?
>):
Boolean
=
c
.
all
({
contains
(
it
)})
...
...
libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt
浏览文件 @
61459961
...
@@ -229,7 +229,7 @@ fun specialJVM(): List<GenericFunction> {
...
@@ -229,7 +229,7 @@ fun specialJVM(): List<GenericFunction> {
"""
"""
return object : AbstractList<T>(), RandomAccess {
return object : AbstractList<T>(), RandomAccess {
override val size: Int get() = this@asList.size()
override val size: Int get() = this@asList.size()
override
fun isEmpty(): Boolean
= this@asList.isEmpty()
override
val isEmpty: Boolean get()
= this@asList.isEmpty()
override fun contains(o: T): Boolean = this@asList.contains(o)
override fun contains(o: T): Boolean = this@asList.contains(o)
override fun iterator(): MutableIterator<T> = this@asList.iterator() as MutableIterator<T>
override fun iterator(): MutableIterator<T> = this@asList.iterator() as MutableIterator<T>
override fun get(index: Int): T = this@asList[index]
override fun get(index: Int): T = this@asList[index]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录