[stdlib] Explicit visibility and return types: builtins

This commit is contained in:
Ilya Gorbunov
2023-09-19 14:24:45 +02:00
committed by Space Team
parent df190b1265
commit ab7c2f2196
15 changed files with 30 additions and 30 deletions
@@ -10,7 +10,7 @@ package kotlin.collections
/** An iterator over a sequence of values of type `Byte`. */
public abstract class ByteIterator : Iterator<Byte> {
override final fun next() = nextByte()
final override fun next(): Byte = nextByte()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextByte(): Byte
@@ -18,7 +18,7 @@ public abstract class ByteIterator : Iterator<Byte> {
/** An iterator over a sequence of values of type `Char`. */
public abstract class CharIterator : Iterator<Char> {
override final fun next() = nextChar()
final override fun next(): Char = nextChar()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextChar(): Char
@@ -26,7 +26,7 @@ public abstract class CharIterator : Iterator<Char> {
/** An iterator over a sequence of values of type `Short`. */
public abstract class ShortIterator : Iterator<Short> {
override final fun next() = nextShort()
final override fun next(): Short = nextShort()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextShort(): Short
@@ -34,7 +34,7 @@ public abstract class ShortIterator : Iterator<Short> {
/** An iterator over a sequence of values of type `Int`. */
public abstract class IntIterator : Iterator<Int> {
override final fun next() = nextInt()
final override fun next(): Int = nextInt()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextInt(): Int
@@ -42,7 +42,7 @@ public abstract class IntIterator : Iterator<Int> {
/** An iterator over a sequence of values of type `Long`. */
public abstract class LongIterator : Iterator<Long> {
override final fun next() = nextLong()
final override fun next(): Long = nextLong()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextLong(): Long
@@ -50,7 +50,7 @@ public abstract class LongIterator : Iterator<Long> {
/** An iterator over a sequence of values of type `Float`. */
public abstract class FloatIterator : Iterator<Float> {
override final fun next() = nextFloat()
final override fun next(): Float = nextFloat()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextFloat(): Float
@@ -58,7 +58,7 @@ public abstract class FloatIterator : Iterator<Float> {
/** An iterator over a sequence of values of type `Double`. */
public abstract class DoubleIterator : Iterator<Double> {
override final fun next() = nextDouble()
final override fun next(): Double = nextDouble()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextDouble(): Double
@@ -66,7 +66,7 @@ public abstract class DoubleIterator : Iterator<Double> {
/** An iterator over a sequence of values of type `Boolean`. */
public abstract class BooleanIterator : Iterator<Boolean> {
override final fun next() = nextBoolean()
final override fun next(): Boolean = nextBoolean()
/** Returns the next value in the sequence without boxing. */
public abstract fun nextBoolean(): Boolean
@@ -41,7 +41,7 @@ public class CharRange(start: Char, endInclusive: Char) : CharProgression(start,
override fun toString(): String = "$first..$last"
companion object {
public companion object {
/** An empty range of values of type Char. */
public val EMPTY: CharRange = CharRange(1.toChar(), 0.toChar())
}
@@ -80,7 +80,7 @@ public class IntRange(start: Int, endInclusive: Int) : IntProgression(start, end
override fun toString(): String = "$first..$last"
companion object {
public companion object {
/** An empty range of values of type Int. */
public val EMPTY: IntRange = IntRange(1, 0)
}
@@ -119,7 +119,7 @@ public class LongRange(start: Long, endInclusive: Long) : LongProgression(start,
override fun toString(): String = "$first..$last"
companion object {
public companion object {
/** An empty range of values of type Long. */
public val EMPTY: LongRange = LongRange(1, 0)
}
@@ -59,7 +59,7 @@ public open class CharProgression
override fun toString(): String = if (step > 0) "$first..$last step $step" else "$first downTo $last step ${-step}"
companion object {
public companion object {
/**
* Creates CharProgression within the specified bounds of a closed range.
*
@@ -121,7 +121,7 @@ public open class IntProgression
override fun toString(): String = if (step > 0) "$first..$last step $step" else "$first downTo $last step ${-step}"
companion object {
public companion object {
/**
* Creates IntProgression within the specified bounds of a closed range.
*
@@ -183,7 +183,7 @@ public open class LongProgression
override fun toString(): String = if (step > 0) "$first..$last step $step" else "$first downTo $last step ${-step}"
companion object {
public companion object {
/**
* Creates LongProgression within the specified bounds of a closed range.
*
+1 -1
View File
@@ -82,7 +82,7 @@ public interface ClosedFloatingPointRange<T : Comparable<T>> : ClosedRange<T> {
/**
* Compares two values of range domain type and returns true if first is less than or equal to second.
*/
fun lessThanOrEquals(a: T, b: T): Boolean
public fun lessThanOrEquals(a: T, b: T): Boolean
}