kool
/
kool.lib
/
take
take
fun
ByteBuffer
.
take
(n:
Int
):
List
<
Byte
>
Content copied to clipboard
fun
ShortBuffer
.
take
(n:
Int
):
List
<
Short
>
Content copied to clipboard
fun
IntBuffer
.
take
(n:
Int
):
List
<
Int
>
Content copied to clipboard
fun
LongBuffer
.
take
(n:
Int
):
List
<
Long
>
Content copied to clipboard
fun
FloatBuffer
.
take
(n:
Int
):
List
<
Float
>
Content copied to clipboard
fun
DoubleBuffer
.
take
(n:
Int
):
List
<
Double
>
Content copied to clipboard
fun
CharBuffer
.
take
(n:
Int
):
List
<
Char
>
Content copied to clipboard
Returns a list containing first
n
elements.
Samples
kool.buffers.Collections.Transformations.take
Throws
kotlin.IllegalArgumentException
if
n
is negative.