Slice

com.github.arturopala.bufferandslice.Slice
See theSlice companion trait
object Slice

Slice companion object. Host factory methods.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Slice.type

Members list

Value members

Concrete methods

def apply[T](head: T, tail: T*): Slice[T]

Creates new detached Slice out of given value sequence.

Creates new detached Slice out of given value sequence.

Attributes

def apply[T](mapF: Int => T): Slice[T]

Creates new unbound Slice of function of integers.

Creates new unbound Slice of function of integers.

Attributes

def apply[T](mapF: Int => T, from: Int, to: Int): Slice[T]

Creates new bounded Slice of function of a range of integers.

Creates new bounded Slice of function of a range of integers.

Attributes

def empty[T]: Slice[T]

Creates an empty Slice of given type.

Creates an empty Slice of given type.

Attributes

def of[T](array: Array[T]): Slice[T]

Creates new Slice of given array values.

Creates new Slice of given array values.

Attributes

Note

This DOES NOT make a copy, any changes to the underlying array will directly affect the slice output. For full immutability does not share array reference with other components.

def of[T](array: Array[T], from: Int, to: Int): Slice[T]

Creates new Slice of given subset of array values.

Creates new Slice of given subset of array values.

Attributes