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:
@@ -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