Transform some builtin methods
1. CharSequence.charAt -> get 2. ML.remove(Int) -> removeAt, 3. MC.remove(Any?) -> MC.remove(E)
This commit is contained in:
-1
@@ -348,7 +348,6 @@ internal val binaryOperations: HashMap<BinaryOperationKey<*, *>, Pair<Function2<
|
||||
binaryOperation(SHORT, LONG, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }),
|
||||
binaryOperation(SHORT, SHORT, "times", { a, b -> a.times(b) }, { a, b -> a.multiply(b) }),
|
||||
binaryOperation(SHORT, ANY, "equals", { a, b -> a.equals(b) }, emptyBinaryFun),
|
||||
binaryOperation(STRING, INT, "charAt", { a, b -> a.charAt(b) }, emptyBinaryFun),
|
||||
binaryOperation(STRING, STRING, "compareTo", { a, b -> a.compareTo(b) }, emptyBinaryFun),
|
||||
binaryOperation(STRING, INT, "get", { a, b -> a.get(b) }, emptyBinaryFun),
|
||||
binaryOperation(STRING, ANY, "plus", { a, b -> a.plus(b) }, emptyBinaryFun),
|
||||
|
||||
+6
-7
@@ -262,7 +262,7 @@ public final class CharRange : kotlin.Range<kotlin.Char>, kotlin.Progression<kot
|
||||
}
|
||||
|
||||
public interface CharSequence {
|
||||
public abstract fun charAt(/*0*/ index: kotlin.Int): kotlin.Char
|
||||
public abstract operator fun get(/*0*/ index: kotlin.Int): kotlin.Char
|
||||
public abstract fun length(): kotlin.Int
|
||||
public abstract fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence
|
||||
}
|
||||
@@ -961,7 +961,7 @@ public interface MutableCollection</*0*/ E> : kotlin.Collection<E>, kotlin.Mutab
|
||||
public abstract override /*1*/ /*fake_override*/ fun contains(/*0*/ o: E): kotlin.Boolean
|
||||
public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection<E>): kotlin.Boolean
|
||||
public abstract override /*2*/ fun iterator(): kotlin.MutableIterator<E>
|
||||
public abstract fun remove(/*0*/ o: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun remove(/*0*/ o: E): kotlin.Boolean
|
||||
public abstract fun removeAll(/*0*/ c: kotlin.Collection<kotlin.Any?>): kotlin.Boolean
|
||||
public abstract fun retainAll(/*0*/ c: kotlin.Collection<kotlin.Any?>): kotlin.Boolean
|
||||
}
|
||||
@@ -994,9 +994,9 @@ public interface MutableList</*0*/ E> : kotlin.List<E>, kotlin.MutableCollection
|
||||
public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int
|
||||
public abstract override /*1*/ fun listIterator(): kotlin.MutableListIterator<E>
|
||||
public abstract override /*1*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.MutableListIterator<E>
|
||||
public abstract override /*1*/ fun remove(/*0*/ o: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun remove(/*0*/ index: kotlin.Int): E
|
||||
public abstract override /*1*/ fun remove(/*0*/ o: E): kotlin.Boolean
|
||||
public abstract override /*1*/ fun removeAll(/*0*/ c: kotlin.Collection<kotlin.Any?>): kotlin.Boolean
|
||||
public abstract fun removeAt(/*0*/ index: kotlin.Int): E
|
||||
public abstract override /*1*/ fun retainAll(/*0*/ c: kotlin.Collection<kotlin.Any?>): kotlin.Boolean
|
||||
public abstract operator fun set(/*0*/ index: kotlin.Int, /*1*/ element: E): E
|
||||
public abstract override /*1*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList<E>
|
||||
@@ -1050,7 +1050,7 @@ public interface MutableSet</*0*/ E> : kotlin.Set<E>, kotlin.MutableCollection<E
|
||||
public abstract override /*2*/ /*fake_override*/ fun contains(/*0*/ o: E): kotlin.Boolean
|
||||
public abstract override /*2*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection<E>): kotlin.Boolean
|
||||
public abstract override /*2*/ fun iterator(): kotlin.MutableIterator<E>
|
||||
public abstract override /*1*/ fun remove(/*0*/ o: kotlin.Any?): kotlin.Boolean
|
||||
public abstract override /*1*/ fun remove(/*0*/ o: E): kotlin.Boolean
|
||||
public abstract override /*1*/ fun removeAll(/*0*/ c: kotlin.Collection<kotlin.Any?>): kotlin.Boolean
|
||||
public abstract override /*1*/ fun retainAll(/*0*/ c: kotlin.Collection<kotlin.Any?>): kotlin.Boolean
|
||||
}
|
||||
@@ -1255,9 +1255,8 @@ public final class ShortRange : kotlin.Range<kotlin.Short>, kotlin.Progression<k
|
||||
|
||||
public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence {
|
||||
/*primary*/ public constructor String()
|
||||
public open override /*1*/ fun charAt(/*0*/ index: kotlin.Int): kotlin.Char
|
||||
public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
|
||||
public final operator fun get(/*0*/ index: kotlin.Int): kotlin.Char
|
||||
public open override /*1*/ fun get(/*0*/ index: kotlin.Int): kotlin.Char
|
||||
public open override /*1*/ fun length(): kotlin.Int
|
||||
public final operator fun plus(/*0*/ other: kotlin.Any?): kotlin.String
|
||||
public open override /*1*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence
|
||||
|
||||
@@ -28,7 +28,7 @@ public interface CharSequence {
|
||||
/**
|
||||
* Returns the character at the specified [index] in the sequence.
|
||||
*/
|
||||
public fun charAt(index: Int): Char
|
||||
public operator fun get(index: Int): Char
|
||||
|
||||
/**
|
||||
* Returns a subsequence of this sequence.
|
||||
|
||||
@@ -91,7 +91,7 @@ public interface MutableCollection<E> : Collection<E>, MutableIterable<E> {
|
||||
*
|
||||
* @return `true` if the element has been successfully removed; `false` if it was not present in the collection.
|
||||
*/
|
||||
public fun remove(o: Any?): Boolean
|
||||
public fun remove(o: E): Boolean
|
||||
|
||||
// Bulk Modification Operations
|
||||
/**
|
||||
@@ -181,7 +181,7 @@ public interface List<out E> : Collection<E> {
|
||||
public interface MutableList<E> : List<E>, MutableCollection<E> {
|
||||
// Modification Operations
|
||||
override fun add(e: E): Boolean
|
||||
override fun remove(o: Any?): Boolean
|
||||
override fun remove(o: E): Boolean
|
||||
|
||||
// Bulk Modification Operations
|
||||
override fun addAll(c: Collection<E>): Boolean
|
||||
@@ -214,7 +214,7 @@ public interface MutableList<E> : List<E>, MutableCollection<E> {
|
||||
*
|
||||
* @return the element that has been removed.
|
||||
*/
|
||||
public fun remove(index: Int): E
|
||||
public fun removeAt(index: Int): E
|
||||
|
||||
// List Iterators
|
||||
override fun listIterator(): MutableListIterator<E>
|
||||
@@ -252,7 +252,7 @@ public interface MutableSet<E> : Set<E>, MutableCollection<E> {
|
||||
|
||||
// Modification Operations
|
||||
override fun add(e: E): Boolean
|
||||
override fun remove(o: Any?): Boolean
|
||||
override fun remove(o: E): Boolean
|
||||
|
||||
// Bulk Modification Operations
|
||||
override fun addAll(c: Collection<E>): Boolean
|
||||
|
||||
@@ -28,14 +28,9 @@ public class String : Comparable<String>, CharSequence {
|
||||
*/
|
||||
public operator fun plus(other: Any?): String
|
||||
|
||||
/**
|
||||
* Returns the character at the specified [index].
|
||||
*/
|
||||
public operator fun get(index: Int): Char
|
||||
|
||||
public override fun length(): Int
|
||||
|
||||
public override fun charAt(index: Int): Char
|
||||
public override fun get(index: Int): Char
|
||||
|
||||
public override fun subSequence(start: Int, end: Int): CharSequence
|
||||
|
||||
|
||||
Reference in New Issue
Block a user