toSet

fun ByteBuffer.toSet(): Set<Byte>
fun ShortBuffer.toSet(): Set<Short>
fun IntBuffer.toSet(): Set<Int>
fun LongBuffer.toSet(): Set<Long>
fun FloatBuffer.toSet(): Set<Float>
fun DoubleBuffer.toSet(): Set<Double>
fun CharBuffer.toSet(): Set<Char>

Returns a Set of all elements. The returned set preserves the element iteration order of the original buffer.