INVISIBLE_MEMBER_FROM_INLINE renamed to NON_PUBLIC_CALL_FROM_PUBLIC_INLINE
This commit is contained in:
@@ -772,7 +772,7 @@ public interface Errors {
|
|||||||
DiagnosticFactory0<KtClass> NESTED_CLASS_NOT_ALLOWED = DiagnosticFactory0.create(ERROR, DECLARATION_NAME);
|
DiagnosticFactory0<KtClass> NESTED_CLASS_NOT_ALLOWED = DiagnosticFactory0.create(ERROR, DECLARATION_NAME);
|
||||||
|
|
||||||
//Inline and inlinable parameters
|
//Inline and inlinable parameters
|
||||||
DiagnosticFactory2<KtElement, DeclarationDescriptor, DeclarationDescriptor> INVISIBLE_MEMBER_FROM_INLINE = DiagnosticFactory2.create(ERROR, CALL_ELEMENT);
|
DiagnosticFactory2<KtElement, DeclarationDescriptor, DeclarationDescriptor> NON_PUBLIC_CALL_FROM_PUBLIC_INLINE = DiagnosticFactory2.create(ERROR, CALL_ELEMENT);
|
||||||
DiagnosticFactory2<KtElement, DeclarationDescriptor, DeclarationDescriptor> PRIVATE_CLASS_MEMBER_FROM_INLINE = DiagnosticFactory2.create(ERROR, CALL_ELEMENT);
|
DiagnosticFactory2<KtElement, DeclarationDescriptor, DeclarationDescriptor> PRIVATE_CLASS_MEMBER_FROM_INLINE = DiagnosticFactory2.create(ERROR, CALL_ELEMENT);
|
||||||
DiagnosticFactory1<KtElement, KtElement> NON_LOCAL_RETURN_NOT_ALLOWED = DiagnosticFactory1.create(ERROR, CALL_ELEMENT);
|
DiagnosticFactory1<KtElement, KtElement> NON_LOCAL_RETURN_NOT_ALLOWED = DiagnosticFactory1.create(ERROR, CALL_ELEMENT);
|
||||||
DiagnosticFactory2<KtElement, KtNamedDeclaration, DeclarationDescriptor> NOT_YET_SUPPORTED_IN_INLINE = DiagnosticFactory2.create(ERROR);
|
DiagnosticFactory2<KtElement, KtNamedDeclaration, DeclarationDescriptor> NOT_YET_SUPPORTED_IN_INLINE = DiagnosticFactory2.create(ERROR);
|
||||||
@@ -789,7 +789,7 @@ public interface Errors {
|
|||||||
ImmutableSet<? extends DiagnosticFactory<?>> UNRESOLVED_REFERENCE_DIAGNOSTICS = ImmutableSet.of(
|
ImmutableSet<? extends DiagnosticFactory<?>> UNRESOLVED_REFERENCE_DIAGNOSTICS = ImmutableSet.of(
|
||||||
UNRESOLVED_REFERENCE, NAMED_PARAMETER_NOT_FOUND, UNRESOLVED_REFERENCE_WRONG_RECEIVER);
|
UNRESOLVED_REFERENCE, NAMED_PARAMETER_NOT_FOUND, UNRESOLVED_REFERENCE_WRONG_RECEIVER);
|
||||||
ImmutableSet<? extends DiagnosticFactory<?>> INVISIBLE_REFERENCE_DIAGNOSTICS = ImmutableSet.of(
|
ImmutableSet<? extends DiagnosticFactory<?>> INVISIBLE_REFERENCE_DIAGNOSTICS = ImmutableSet.of(
|
||||||
INVISIBLE_MEMBER, INVISIBLE_MEMBER_FROM_INLINE, INVISIBLE_REFERENCE, INVISIBLE_SETTER);
|
INVISIBLE_MEMBER, NON_PUBLIC_CALL_FROM_PUBLIC_INLINE, INVISIBLE_REFERENCE, INVISIBLE_SETTER);
|
||||||
ImmutableSet<? extends DiagnosticFactory<?>> UNUSED_ELEMENT_DIAGNOSTICS = ImmutableSet.of(
|
ImmutableSet<? extends DiagnosticFactory<?>> UNUSED_ELEMENT_DIAGNOSTICS = ImmutableSet.of(
|
||||||
UNUSED_VARIABLE, UNUSED_PARAMETER, ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE, VARIABLE_WITH_REDUNDANT_INITIALIZER,
|
UNUSED_VARIABLE, UNUSED_PARAMETER, ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE, VARIABLE_WITH_REDUNDANT_INITIALIZER,
|
||||||
UNUSED_LAMBDA_EXPRESSION, USELESS_CAST, UNUSED_VALUE, USELESS_ELVIS);
|
UNUSED_LAMBDA_EXPRESSION, USELESS_CAST, UNUSED_VALUE, USELESS_ELVIS);
|
||||||
|
|||||||
+1
-2
@@ -732,9 +732,8 @@ public class DefaultErrorMessages {
|
|||||||
MAP.put(ARRAY_CLASS_LITERAL_REQUIRES_ARGUMENT, "kotlin.Array class literal requires a type argument, please specify one in angle brackets");
|
MAP.put(ARRAY_CLASS_LITERAL_REQUIRES_ARGUMENT, "kotlin.Array class literal requires a type argument, please specify one in angle brackets");
|
||||||
|
|
||||||
//Inline
|
//Inline
|
||||||
MAP.put(INVISIBLE_MEMBER_FROM_INLINE, "Public-API inline function cannot access non-public-API ''{0}''", SHORT_NAMES_IN_TYPES, SHORT_NAMES_IN_TYPES);
|
MAP.put(NON_PUBLIC_CALL_FROM_PUBLIC_INLINE, "Public-API inline function cannot access non-public-API ''{0}''", SHORT_NAMES_IN_TYPES, SHORT_NAMES_IN_TYPES);
|
||||||
MAP.put(PRIVATE_CLASS_MEMBER_FROM_INLINE, "Non-private inline function cannot access members of private classes: ''{0}''", SHORT_NAMES_IN_TYPES, SHORT_NAMES_IN_TYPES);
|
MAP.put(PRIVATE_CLASS_MEMBER_FROM_INLINE, "Non-private inline function cannot access members of private classes: ''{0}''", SHORT_NAMES_IN_TYPES, SHORT_NAMES_IN_TYPES);
|
||||||
|
|
||||||
MAP.put(NOT_YET_SUPPORTED_IN_INLINE, "''{0}'' construction is not yet supported in inline functions", ELEMENT_TEXT, SHORT_NAMES_IN_TYPES);
|
MAP.put(NOT_YET_SUPPORTED_IN_INLINE, "''{0}'' construction is not yet supported in inline functions", ELEMENT_TEXT, SHORT_NAMES_IN_TYPES);
|
||||||
MAP.put(DECLARATION_CANT_BE_INLINED, "''inline'' modifier is not allowed on virtual members. Only private or final members can be inlined");
|
MAP.put(DECLARATION_CANT_BE_INLINED, "''inline'' modifier is not allowed on virtual members. Only private or final members can be inlined");
|
||||||
MAP.put(NOTHING_TO_INLINE, "Expected performance impact of inlining ''{0}'' can be insignificant. Inlining works best for functions with lambda parameters", SHORT_NAMES_IN_TYPES);
|
MAP.put(NOTHING_TO_INLINE, "Expected performance impact of inlining ''{0}'' can be insignificant. Inlining works best for functions with lambda parameters", SHORT_NAMES_IN_TYPES);
|
||||||
|
|||||||
+1
-1
@@ -241,7 +241,7 @@ class InlineChecker implements CallChecker {
|
|||||||
private void checkVisibilityAndAccess(@NotNull CallableDescriptor declarationDescriptor, @NotNull KtElement expression, @NotNull BasicCallResolutionContext context){
|
private void checkVisibilityAndAccess(@NotNull CallableDescriptor declarationDescriptor, @NotNull KtElement expression, @NotNull BasicCallResolutionContext context){
|
||||||
boolean declarationDescriptorIsPublicApi = DescriptorUtilsKt.isEffectivelyPublicApi(declarationDescriptor) || isDefinedInInlineFunction(declarationDescriptor);
|
boolean declarationDescriptorIsPublicApi = DescriptorUtilsKt.isEffectivelyPublicApi(declarationDescriptor) || isDefinedInInlineFunction(declarationDescriptor);
|
||||||
if (isEffectivelyPublicApiFunction && !declarationDescriptorIsPublicApi && declarationDescriptor.getVisibility() != Visibilities.LOCAL) {
|
if (isEffectivelyPublicApiFunction && !declarationDescriptorIsPublicApi && declarationDescriptor.getVisibility() != Visibilities.LOCAL) {
|
||||||
context.trace.report(Errors.INVISIBLE_MEMBER_FROM_INLINE.on(expression, declarationDescriptor, descriptor));
|
context.trace.report(Errors.NON_PUBLIC_CALL_FROM_PUBLIC_INLINE.on(expression, declarationDescriptor, descriptor));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
checkPrivateClassMemberAccess(declarationDescriptor, expression, context);
|
checkPrivateClassMemberAccess(declarationDescriptor, expression, context);
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@ private class Z public constructor(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
public inline fun test() {
|
public inline fun test() {
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>Z<!>().<!INVISIBLE_MEMBER_FROM_INLINE!>publicProperty<!>
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>Z<!>().<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>publicProperty<!>
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>Z<!>().<!INVISIBLE_MEMBER_FROM_INLINE!>publicFun<!>()
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>Z<!>().<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>publicFun<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal inline fun testInternal() {
|
internal inline fun testInternal() {
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ internal val internalProperty = 11;
|
|||||||
internal fun internalFun() {}
|
internal fun internalFun() {}
|
||||||
|
|
||||||
public inline fun test() {
|
public inline fun test() {
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>privateFun<!>()
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>privateProperty<!>
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateProperty<!>
|
||||||
}
|
}
|
||||||
|
|
||||||
public inline fun test2() {
|
public inline fun test2() {
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>internalFun<!>()
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>internalFun<!>()
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>internalProperty<!>
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>internalProperty<!>
|
||||||
}
|
}
|
||||||
|
|
||||||
internal inline fun testInternal() {
|
internal inline fun testInternal() {
|
||||||
|
|||||||
+4
-4
@@ -8,8 +8,8 @@ public class Z {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public inline fun test() {
|
public inline fun test() {
|
||||||
Z().<!INVISIBLE_MEMBER_FROM_INLINE!>privateProperty<!>
|
Z().<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateProperty<!>
|
||||||
Z().<!INVISIBLE_MEMBER_FROM_INLINE!>privateFun<!>()
|
Z().<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal inline fun testInternal() {
|
internal inline fun testInternal() {
|
||||||
@@ -26,8 +26,8 @@ public class Z2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public inline fun test() {
|
public inline fun test() {
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>privateProperty<!>
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateProperty<!>
|
||||||
<!INVISIBLE_MEMBER_FROM_INLINE!>privateFun<!>()
|
<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>privateFun<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal inline fun testInternal() {
|
internal inline fun testInternal() {
|
||||||
|
|||||||
@@ -5491,7 +5491,7 @@ public fun Array<out Short>.toShortArray(): ShortArray {
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <T, K, V> Array<out T>.associate(transform: (T) -> Pair<K, V>): Map<K, V> {
|
public inline fun <T, K, V> Array<out T>.associate(transform: (T) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5502,7 +5502,7 @@ public inline fun <T, K, V> Array<out T>.associate(transform: (T) -> Pair<K, V>)
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> ByteArray.associate(transform: (Byte) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> ByteArray.associate(transform: (Byte) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5513,7 +5513,7 @@ public inline fun <K, V> ByteArray.associate(transform: (Byte) -> Pair<K, V>): M
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> ShortArray.associate(transform: (Short) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> ShortArray.associate(transform: (Short) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5524,7 +5524,7 @@ public inline fun <K, V> ShortArray.associate(transform: (Short) -> Pair<K, V>):
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> IntArray.associate(transform: (Int) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> IntArray.associate(transform: (Int) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5535,7 +5535,7 @@ public inline fun <K, V> IntArray.associate(transform: (Int) -> Pair<K, V>): Map
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> LongArray.associate(transform: (Long) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> LongArray.associate(transform: (Long) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5546,7 +5546,7 @@ public inline fun <K, V> LongArray.associate(transform: (Long) -> Pair<K, V>): M
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> FloatArray.associate(transform: (Float) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> FloatArray.associate(transform: (Float) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5557,7 +5557,7 @@ public inline fun <K, V> FloatArray.associate(transform: (Float) -> Pair<K, V>):
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> DoubleArray.associate(transform: (Double) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> DoubleArray.associate(transform: (Double) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5568,7 +5568,7 @@ public inline fun <K, V> DoubleArray.associate(transform: (Double) -> Pair<K, V>
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> BooleanArray.associate(transform: (Boolean) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> BooleanArray.associate(transform: (Boolean) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5579,7 +5579,7 @@ public inline fun <K, V> BooleanArray.associate(transform: (Boolean) -> Pair<K,
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> CharArray.associate(transform: (Char) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> CharArray.associate(transform: (Char) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -5590,7 +5590,7 @@ public inline fun <K, V> CharArray.associate(transform: (Char) -> Pair<K, V>): M
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <T, K> Array<out T>.associateBy(keySelector: (T) -> K): Map<K, T> {
|
public inline fun <T, K> Array<out T>.associateBy(keySelector: (T) -> K): Map<K, T> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5601,7 +5601,7 @@ public inline fun <T, K> Array<out T>.associateBy(keySelector: (T) -> K): Map<K,
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> ByteArray.associateBy(keySelector: (Byte) -> K): Map<K, Byte> {
|
public inline fun <K> ByteArray.associateBy(keySelector: (Byte) -> K): Map<K, Byte> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Byte>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Byte>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5612,7 +5612,7 @@ public inline fun <K> ByteArray.associateBy(keySelector: (Byte) -> K): Map<K, By
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> ShortArray.associateBy(keySelector: (Short) -> K): Map<K, Short> {
|
public inline fun <K> ShortArray.associateBy(keySelector: (Short) -> K): Map<K, Short> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Short>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Short>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5623,7 +5623,7 @@ public inline fun <K> ShortArray.associateBy(keySelector: (Short) -> K): Map<K,
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> IntArray.associateBy(keySelector: (Int) -> K): Map<K, Int> {
|
public inline fun <K> IntArray.associateBy(keySelector: (Int) -> K): Map<K, Int> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Int>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Int>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5634,7 +5634,7 @@ public inline fun <K> IntArray.associateBy(keySelector: (Int) -> K): Map<K, Int>
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> LongArray.associateBy(keySelector: (Long) -> K): Map<K, Long> {
|
public inline fun <K> LongArray.associateBy(keySelector: (Long) -> K): Map<K, Long> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Long>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Long>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5645,7 +5645,7 @@ public inline fun <K> LongArray.associateBy(keySelector: (Long) -> K): Map<K, Lo
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> FloatArray.associateBy(keySelector: (Float) -> K): Map<K, Float> {
|
public inline fun <K> FloatArray.associateBy(keySelector: (Float) -> K): Map<K, Float> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Float>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Float>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5656,7 +5656,7 @@ public inline fun <K> FloatArray.associateBy(keySelector: (Float) -> K): Map<K,
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> DoubleArray.associateBy(keySelector: (Double) -> K): Map<K, Double> {
|
public inline fun <K> DoubleArray.associateBy(keySelector: (Double) -> K): Map<K, Double> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Double>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Double>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5667,7 +5667,7 @@ public inline fun <K> DoubleArray.associateBy(keySelector: (Double) -> K): Map<K
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> BooleanArray.associateBy(keySelector: (Boolean) -> K): Map<K, Boolean> {
|
public inline fun <K> BooleanArray.associateBy(keySelector: (Boolean) -> K): Map<K, Boolean> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Boolean>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Boolean>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5678,7 +5678,7 @@ public inline fun <K> BooleanArray.associateBy(keySelector: (Boolean) -> K): Map
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> CharArray.associateBy(keySelector: (Char) -> K): Map<K, Char> {
|
public inline fun <K> CharArray.associateBy(keySelector: (Char) -> K): Map<K, Char> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Char>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Char>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -5688,7 +5688,7 @@ public inline fun <K> CharArray.associateBy(keySelector: (Char) -> K): Map<K, Ch
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <T, K, V> Array<out T>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map<K, V> {
|
public inline fun <T, K, V> Array<out T>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5698,7 +5698,7 @@ public inline fun <T, K, V> Array<out T>.associateBy(keySelector: (T) -> K, valu
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> ByteArray.associateBy(keySelector: (Byte) -> K, valueTransform: (Byte) -> V): Map<K, V> {
|
public inline fun <K, V> ByteArray.associateBy(keySelector: (Byte) -> K, valueTransform: (Byte) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5708,7 +5708,7 @@ public inline fun <K, V> ByteArray.associateBy(keySelector: (Byte) -> K, valueTr
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> ShortArray.associateBy(keySelector: (Short) -> K, valueTransform: (Short) -> V): Map<K, V> {
|
public inline fun <K, V> ShortArray.associateBy(keySelector: (Short) -> K, valueTransform: (Short) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5718,7 +5718,7 @@ public inline fun <K, V> ShortArray.associateBy(keySelector: (Short) -> K, value
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> IntArray.associateBy(keySelector: (Int) -> K, valueTransform: (Int) -> V): Map<K, V> {
|
public inline fun <K, V> IntArray.associateBy(keySelector: (Int) -> K, valueTransform: (Int) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5728,7 +5728,7 @@ public inline fun <K, V> IntArray.associateBy(keySelector: (Int) -> K, valueTran
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> LongArray.associateBy(keySelector: (Long) -> K, valueTransform: (Long) -> V): Map<K, V> {
|
public inline fun <K, V> LongArray.associateBy(keySelector: (Long) -> K, valueTransform: (Long) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5738,7 +5738,7 @@ public inline fun <K, V> LongArray.associateBy(keySelector: (Long) -> K, valueTr
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> FloatArray.associateBy(keySelector: (Float) -> K, valueTransform: (Float) -> V): Map<K, V> {
|
public inline fun <K, V> FloatArray.associateBy(keySelector: (Float) -> K, valueTransform: (Float) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5748,7 +5748,7 @@ public inline fun <K, V> FloatArray.associateBy(keySelector: (Float) -> K, value
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> DoubleArray.associateBy(keySelector: (Double) -> K, valueTransform: (Double) -> V): Map<K, V> {
|
public inline fun <K, V> DoubleArray.associateBy(keySelector: (Double) -> K, valueTransform: (Double) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5758,7 +5758,7 @@ public inline fun <K, V> DoubleArray.associateBy(keySelector: (Double) -> K, val
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> BooleanArray.associateBy(keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): Map<K, V> {
|
public inline fun <K, V> BooleanArray.associateBy(keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -5768,7 +5768,7 @@ public inline fun <K, V> BooleanArray.associateBy(keySelector: (Boolean) -> K, v
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> CharArray.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map<K, V> {
|
public inline fun <K, V> CharArray.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -11383,7 +11383,7 @@ public infix fun <R> CharArray.zip(other: Iterable<R>): List<Pair<Char, R>> {
|
|||||||
*/
|
*/
|
||||||
public inline fun <T, R, V> Array<out T>.zip(other: Iterable<R>, transform: (T, R) -> V): List<V> {
|
public inline fun <T, R, V> Array<out T>.zip(other: Iterable<R>, transform: (T, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11398,7 +11398,7 @@ public inline fun <T, R, V> Array<out T>.zip(other: Iterable<R>, transform: (T,
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> ByteArray.zip(other: Iterable<R>, transform: (Byte, R) -> V): List<V> {
|
public inline fun <R, V> ByteArray.zip(other: Iterable<R>, transform: (Byte, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11413,7 +11413,7 @@ public inline fun <R, V> ByteArray.zip(other: Iterable<R>, transform: (Byte, R)
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> ShortArray.zip(other: Iterable<R>, transform: (Short, R) -> V): List<V> {
|
public inline fun <R, V> ShortArray.zip(other: Iterable<R>, transform: (Short, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11428,7 +11428,7 @@ public inline fun <R, V> ShortArray.zip(other: Iterable<R>, transform: (Short, R
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> IntArray.zip(other: Iterable<R>, transform: (Int, R) -> V): List<V> {
|
public inline fun <R, V> IntArray.zip(other: Iterable<R>, transform: (Int, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11443,7 +11443,7 @@ public inline fun <R, V> IntArray.zip(other: Iterable<R>, transform: (Int, R) ->
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> LongArray.zip(other: Iterable<R>, transform: (Long, R) -> V): List<V> {
|
public inline fun <R, V> LongArray.zip(other: Iterable<R>, transform: (Long, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11458,7 +11458,7 @@ public inline fun <R, V> LongArray.zip(other: Iterable<R>, transform: (Long, R)
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> FloatArray.zip(other: Iterable<R>, transform: (Float, R) -> V): List<V> {
|
public inline fun <R, V> FloatArray.zip(other: Iterable<R>, transform: (Float, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11473,7 +11473,7 @@ public inline fun <R, V> FloatArray.zip(other: Iterable<R>, transform: (Float, R
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> DoubleArray.zip(other: Iterable<R>, transform: (Double, R) -> V): List<V> {
|
public inline fun <R, V> DoubleArray.zip(other: Iterable<R>, transform: (Double, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11488,7 +11488,7 @@ public inline fun <R, V> DoubleArray.zip(other: Iterable<R>, transform: (Double,
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> BooleanArray.zip(other: Iterable<R>, transform: (Boolean, R) -> V): List<V> {
|
public inline fun <R, V> BooleanArray.zip(other: Iterable<R>, transform: (Boolean, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -11503,7 +11503,7 @@ public inline fun <R, V> BooleanArray.zip(other: Iterable<R>, transform: (Boolea
|
|||||||
*/
|
*/
|
||||||
public inline fun <R, V> CharArray.zip(other: Iterable<R>, transform: (Char, R) -> V): List<V> {
|
public inline fun <R, V> CharArray.zip(other: Iterable<R>, transform: (Char, R) -> V): List<V> {
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
|
|||||||
@@ -926,7 +926,7 @@ public fun Collection<Short>.toShortArray(): ShortArray {
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <T, K, V> Iterable<T>.associate(transform: (T) -> Pair<K, V>): Map<K, V> {
|
public inline fun <T, K, V> Iterable<T>.associate(transform: (T) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -937,7 +937,7 @@ public inline fun <T, K, V> Iterable<T>.associate(transform: (T) -> Pair<K, V>):
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <T, K> Iterable<T>.associateBy(keySelector: (T) -> K): Map<K, T> {
|
public inline fun <T, K> Iterable<T>.associateBy(keySelector: (T) -> K): Map<K, T> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -947,7 +947,7 @@ public inline fun <T, K> Iterable<T>.associateBy(keySelector: (T) -> K): Map<K,
|
|||||||
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <T, K, V> Iterable<T>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map<K, V> {
|
public inline fun <T, K, V> Iterable<T>.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
@@ -1168,7 +1168,7 @@ public inline fun <T, K, V, M : MutableMap<in K, MutableList<V>>> Iterable<T>.gr
|
|||||||
* Returns a list containing the results of applying the given [transform] function
|
* Returns a list containing the results of applying the given [transform] function
|
||||||
* to each element in the original collection.
|
* to each element in the original collection.
|
||||||
*/
|
*/
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R> {
|
public inline fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R> {
|
||||||
return mapTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)
|
return mapTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)
|
||||||
}
|
}
|
||||||
@@ -1177,7 +1177,7 @@ public inline fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R> {
|
|||||||
* Returns a list containing the results of applying the given [transform] function
|
* Returns a list containing the results of applying the given [transform] function
|
||||||
* to each element and its index in the original collection.
|
* to each element and its index in the original collection.
|
||||||
*/
|
*/
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline fun <T, R> Iterable<T>.mapIndexed(transform: (Int, T) -> R): List<R> {
|
public inline fun <T, R> Iterable<T>.mapIndexed(transform: (Int, T) -> R): List<R> {
|
||||||
return mapIndexedTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)
|
return mapIndexedTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)
|
||||||
}
|
}
|
||||||
@@ -1810,7 +1810,7 @@ public infix fun <T, R> Iterable<T>.zip(other: Array<out R>): List<Pair<T, R>> {
|
|||||||
*/
|
*/
|
||||||
public inline fun <T, R, V> Iterable<T>.zip(other: Array<out R>, transform: (T, R) -> V): List<V> {
|
public inline fun <T, R, V> Iterable<T>.zip(other: Array<out R>, transform: (T, R) -> V): List<V> {
|
||||||
val arraySize = other.size
|
val arraySize = other.size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in this) {
|
for (element in this) {
|
||||||
@@ -1833,7 +1833,7 @@ public infix fun <T, R> Iterable<T>.zip(other: Iterable<R>): List<Pair<T, R>> {
|
|||||||
public inline fun <T, R, V> Iterable<T>.zip(other: Iterable<R>, transform: (T, R) -> V): List<V> {
|
public inline fun <T, R, V> Iterable<T>.zip(other: Iterable<R>, transform: (T, R) -> V): List<V> {
|
||||||
val first = iterator()
|
val first = iterator()
|
||||||
val second = other.iterator()
|
val second = other.iterator()
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), other.collectionSizeOrDefault(10)))
|
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), other.collectionSizeOrDefault(10)))
|
||||||
while (first.hasNext() && second.hasNext()) {
|
while (first.hasNext() && second.hasNext()) {
|
||||||
list.add(transform(first.next(), second.next()))
|
list.add(transform(first.next(), second.next()))
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ public inline fun String.reversed(): String {
|
|||||||
* If any of two pairs would have the same key the last one gets added to the map.
|
* If any of two pairs would have the same key the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> CharSequence.associate(transform: (Char) -> Pair<K, V>): Map<K, V> {
|
public inline fun <K, V> CharSequence.associate(transform: (Char) -> Pair<K, V>): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(length).coerceAtLeast(16)
|
val capacity = mapCapacity(length).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
}
|
}
|
||||||
@@ -510,7 +510,7 @@ public inline fun <K, V> CharSequence.associate(transform: (Char) -> Pair<K, V>)
|
|||||||
* If any two characters would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two characters would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K> CharSequence.associateBy(keySelector: (Char) -> K): Map<K, Char> {
|
public inline fun <K> CharSequence.associateBy(keySelector: (Char) -> K): Map<K, Char> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(length).coerceAtLeast(16)
|
val capacity = mapCapacity(length).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, Char>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, Char>(capacity), keySelector)
|
||||||
}
|
}
|
||||||
@@ -520,7 +520,7 @@ public inline fun <K> CharSequence.associateBy(keySelector: (Char) -> K): Map<K,
|
|||||||
* If any two characters would have the same key returned by [keySelector] the last one gets added to the map.
|
* If any two characters would have the same key returned by [keySelector] the last one gets added to the map.
|
||||||
*/
|
*/
|
||||||
public inline fun <K, V> CharSequence.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map<K, V> {
|
public inline fun <K, V> CharSequence.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map<K, V> {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(length).coerceAtLeast(16)
|
val capacity = mapCapacity(length).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import kotlin.internal.Exact
|
|||||||
* @throws NoSuchElementException when the map doesn't contain value for the property name and doesn't provide an implicit default (see [withDefault]).
|
* @throws NoSuchElementException when the map doesn't contain value for the property name and doesn't provide an implicit default (see [withDefault]).
|
||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline operator fun <V, V1: V> Map<in String, @Exact V>.getValue(thisRef: Any?, property: KProperty<*>): V1
|
public inline operator fun <V, V1: V> Map<in String, @Exact V>.getValue(thisRef: Any?, property: KProperty<*>): V1
|
||||||
= getOrImplicitDefault(property.name) as V1
|
= getOrImplicitDefault(property.name) as V1
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ public inline operator fun <V, V1: V> Map<in String, @Exact V>.getValue(thisRef:
|
|||||||
*/
|
*/
|
||||||
@kotlin.jvm.JvmName("getVar")
|
@kotlin.jvm.JvmName("getVar")
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline operator fun <V> MutableMap<in String, in V>.getValue(thisRef: Any?, property: KProperty<*>): V
|
public inline operator fun <V> MutableMap<in String, in V>.getValue(thisRef: Any?, property: KProperty<*>): V
|
||||||
= getOrImplicitDefault(property.name) as V
|
= getOrImplicitDefault(property.name) as V
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ public fun <K, V> MutableMap<in K, in V>.putAll(pairs: Sequence<Pair<K,V>>): Uni
|
|||||||
*
|
*
|
||||||
* @sample test.collections.MapTest.mapValues
|
* @sample test.collections.MapTest.mapValues
|
||||||
*/
|
*/
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline fun <K, V, R> Map<K, V>.mapValues(transform: (Map.Entry<K, V>) -> R): Map<K, R> {
|
public inline fun <K, V, R> Map<K, V>.mapValues(transform: (Map.Entry<K, V>) -> R): Map<K, R> {
|
||||||
return mapValuesTo(LinkedHashMap<K, R>(mapCapacity(size)), transform)
|
return mapValuesTo(LinkedHashMap<K, R>(mapCapacity(size)), transform)
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ public inline fun <K, V, R> Map<K, V>.mapValues(transform: (Map.Entry<K, V>) ->
|
|||||||
*
|
*
|
||||||
* @sample test.collections.MapTest.mapKeys
|
* @sample test.collections.MapTest.mapKeys
|
||||||
*/
|
*/
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline fun <K, V, R> Map<K, V>.mapKeys(transform: (Map.Entry<K, V>) -> R): Map<R, V> {
|
public inline fun <K, V, R> Map<K, V>.mapKeys(transform: (Map.Entry<K, V>) -> R): Map<R, V> {
|
||||||
return mapKeysTo(LinkedHashMap<R, V>(mapCapacity(size)), transform)
|
return mapKeysTo(LinkedHashMap<R, V>(mapCapacity(size)), transform)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ internal fun timer(name: String?, daemon: Boolean) = if (name == null) Timer(dae
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun timer(name: String? = null, daemon: Boolean = false, initialDelay: Long = 0.toLong(), period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
public inline fun timer(name: String? = null, daemon: Boolean = false, initialDelay: Long = 0.toLong(), period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val timer = timer(name, daemon)
|
val timer = timer(name, daemon)
|
||||||
timer.schedule(initialDelay, period, action)
|
timer.schedule(initialDelay, period, action)
|
||||||
return timer
|
return timer
|
||||||
@@ -102,7 +102,7 @@ public inline fun timer(name: String? = null, daemon: Boolean = false, initialDe
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun timer(name: String? = null, daemon: Boolean = false, startAt: Date, period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
public inline fun timer(name: String? = null, daemon: Boolean = false, startAt: Date, period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val timer = timer(name, daemon)
|
val timer = timer(name, daemon)
|
||||||
timer.schedule(startAt, period, action)
|
timer.schedule(startAt, period, action)
|
||||||
return timer
|
return timer
|
||||||
@@ -118,7 +118,7 @@ public inline fun timer(name: String? = null, daemon: Boolean = false, startAt:
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun fixedRateTimer(name: String? = null, daemon: Boolean = false, initialDelay: Long = 0.toLong(), period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
public inline fun fixedRateTimer(name: String? = null, daemon: Boolean = false, initialDelay: Long = 0.toLong(), period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val timer = timer(name, daemon)
|
val timer = timer(name, daemon)
|
||||||
timer.scheduleAtFixedRate(initialDelay, period, action)
|
timer.scheduleAtFixedRate(initialDelay, period, action)
|
||||||
return timer
|
return timer
|
||||||
@@ -133,7 +133,7 @@ public inline fun fixedRateTimer(name: String? = null, daemon: Boolean = false,
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun fixedRateTimer(name: String? = null, daemon: Boolean = false, startAt: Date, period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
public inline fun fixedRateTimer(name: String? = null, daemon: Boolean = false, startAt: Date, period: Long, crossinline action: TimerTask.() -> Unit): Timer {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val timer = timer(name, daemon)
|
val timer = timer(name, daemon)
|
||||||
timer.scheduleAtFixedRate(startAt, period, action)
|
timer.scheduleAtFixedRate(startAt, period, action)
|
||||||
return timer
|
return timer
|
||||||
|
|||||||
@@ -28,5 +28,5 @@ public inline fun String.toRegex(options: Set<RegexOption>): Regex = Regex(this,
|
|||||||
*/
|
*/
|
||||||
@JvmVersion
|
@JvmVersion
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
public inline fun java.util.regex.Pattern.toRegex(): Regex = Regex(this)
|
public inline fun java.util.regex.Pattern.toRegex(): Regex = Regex(this)
|
||||||
@@ -23,7 +23,7 @@ public inline fun assert(value: Boolean) {
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun assert(value: Boolean, lazyMessage: () -> Any) {
|
public inline fun assert(value: Boolean, lazyMessage: () -> Any) {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
if (_Assertions.ENABLED) {
|
if (_Assertions.ENABLED) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
val message = lazyMessage()
|
val message = lazyMessage()
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import kotlin.jvm.internal.unsafe.*
|
|||||||
*/
|
*/
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
public inline fun <R> synchronized(lock: Any, block: () -> R): R {
|
public inline fun <R> synchronized(lock: Any, block: () -> R): R {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
monitorEnter(lock)
|
monitorEnter(lock)
|
||||||
try {
|
try {
|
||||||
return block()
|
return block()
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
monitorExit(lock)
|
monitorExit(lock)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -485,7 +485,7 @@ fun generators(): List<GenericFunction> {
|
|||||||
"""
|
"""
|
||||||
val first = iterator()
|
val first = iterator()
|
||||||
val second = other.iterator()
|
val second = other.iterator()
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), other.collectionSizeOrDefault(10)))
|
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), other.collectionSizeOrDefault(10)))
|
||||||
while (first.hasNext() && second.hasNext()) {
|
while (first.hasNext() && second.hasNext()) {
|
||||||
list.add(transform(first.next(), second.next()))
|
list.add(transform(first.next(), second.next()))
|
||||||
@@ -496,7 +496,7 @@ fun generators(): List<GenericFunction> {
|
|||||||
body(ArraysOfObjects, ArraysOfPrimitives) {
|
body(ArraysOfObjects, ArraysOfPrimitives) {
|
||||||
"""
|
"""
|
||||||
val arraySize = size
|
val arraySize = size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(other.collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in other) {
|
for (element in other) {
|
||||||
@@ -522,7 +522,7 @@ fun generators(): List<GenericFunction> {
|
|||||||
body {
|
body {
|
||||||
"""
|
"""
|
||||||
val arraySize = other.size
|
val arraySize = other.size
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), arraySize))
|
val list = ArrayList<V>(Math.min(collectionSizeOrDefault(10), arraySize))
|
||||||
var i = 0
|
var i = 0
|
||||||
for (element in this) {
|
for (element in this) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ fun mapping(): List<GenericFunction> {
|
|||||||
}
|
}
|
||||||
typeParam("R")
|
typeParam("R")
|
||||||
returns("List<R>")
|
returns("List<R>")
|
||||||
annotations(Iterables) { """@Suppress("INVISIBLE_MEMBER_FROM_INLINE")""" }
|
annotations(Iterables) { """@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")""" }
|
||||||
body(Iterables) {
|
body(Iterables) {
|
||||||
"return mapIndexedTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)"
|
"return mapIndexedTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)"
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ fun mapping(): List<GenericFunction> {
|
|||||||
}
|
}
|
||||||
typeParam("R")
|
typeParam("R")
|
||||||
returns("List<R>")
|
returns("List<R>")
|
||||||
annotations(Iterables) { """@Suppress("INVISIBLE_MEMBER_FROM_INLINE")""" }
|
annotations(Iterables) { """@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")""" }
|
||||||
body(Iterables) {
|
body(Iterables) {
|
||||||
"return mapTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)"
|
"return mapTo(ArrayList<R>(collectionSizeOrDefault(10)), transform)"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ fun snapshots(): List<GenericFunction> {
|
|||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
"""
|
"""
|
||||||
@@ -165,14 +165,14 @@ fun snapshots(): List<GenericFunction> {
|
|||||||
}
|
}
|
||||||
body(CharSequences) {
|
body(CharSequences) {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(length).coerceAtLeast(16)
|
val capacity = mapCapacity(length).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
body(ArraysOfObjects, ArraysOfPrimitives) {
|
body(ArraysOfObjects, ArraysOfPrimitives) {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
return associateTo(LinkedHashMap<K, V>(capacity), transform)
|
||||||
"""
|
"""
|
||||||
@@ -231,7 +231,7 @@ fun snapshots(): List<GenericFunction> {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
||||||
"""
|
"""
|
||||||
@@ -243,14 +243,14 @@ fun snapshots(): List<GenericFunction> {
|
|||||||
}
|
}
|
||||||
body(CharSequences) {
|
body(CharSequences) {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(length).coerceAtLeast(16)
|
val capacity = mapCapacity(length).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
body(ArraysOfObjects, ArraysOfPrimitives) {
|
body(ArraysOfObjects, ArraysOfPrimitives) {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
return associateByTo(LinkedHashMap<K, T>(capacity), keySelector)
|
||||||
"""
|
"""
|
||||||
@@ -325,7 +325,7 @@ fun snapshots(): List<GenericFunction> {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
val capacity = mapCapacity(collectionSizeOrDefault(10)).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
"""
|
"""
|
||||||
@@ -337,14 +337,14 @@ fun snapshots(): List<GenericFunction> {
|
|||||||
}
|
}
|
||||||
body(CharSequences) {
|
body(CharSequences) {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(length).coerceAtLeast(16)
|
val capacity = mapCapacity(length).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
body(ArraysOfObjects, ArraysOfPrimitives) {
|
body(ArraysOfObjects, ArraysOfPrimitives) {
|
||||||
"""
|
"""
|
||||||
@Suppress("INVISIBLE_MEMBER_FROM_INLINE")
|
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||||
val capacity = mapCapacity(size).coerceAtLeast(16)
|
val capacity = mapCapacity(size).coerceAtLeast(16)
|
||||||
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
return associateByTo(LinkedHashMap<K, V>(capacity), keySelector, valueTransform)
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user