All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generated._Arrays.kt Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package kotlin

//
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//

import kotlin.platform.*
import java.util.*

import java.util.Collections // TODO: it's temporary while we have java.util.Collections in js

/**
 * Returns the Iterable that wraps the original array.
 */
public fun  Array.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun BooleanArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun ByteArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun CharArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun DoubleArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun FloatArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun IntArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun LongArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the Iterable that wraps the original array.
 */
public fun ShortArray.asIterable(): Iterable {
    return object : Iterable {
        override fun iterator(): Iterator = [email protected]()
    }
}

/**
 * Returns the range of valid indices for the array.
 */
public val  Array.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val BooleanArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val ByteArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val CharArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val DoubleArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val FloatArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val IntArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val LongArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns the range of valid indices for the array.
 */
public val ShortArray.indices: IntRange
    get() = IntRange(0, lastIndex)

/**
 * Returns `true` if the array is empty.
 */
public fun  Array.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun BooleanArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun ByteArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun CharArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun DoubleArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun FloatArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun IntArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun LongArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is empty.
 */
public fun ShortArray.isEmpty(): Boolean {
    return size() == 0
}

/**
 * Returns `true` if the array is not empty.
 */
public fun  Array.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun BooleanArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun ByteArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun CharArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun DoubleArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun FloatArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun IntArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun LongArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns `true` if the array is not empty.
 */
public fun ShortArray.isNotEmpty(): Boolean {
    return !isEmpty()
}

/**
 * Returns the last valid index for the array.
 */
public val  Array.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val BooleanArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val ByteArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val CharArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val DoubleArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val FloatArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val IntArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val LongArray.lastIndex: Int
    get() = size() - 1

/**
 * Returns the last valid index for the array.
 */
public val ShortArray.lastIndex: Int
    get() = size() - 1





© 2015 - 2025 Weber Informatics LLC | Privacy Policy