SmallHashMap

com.netflix.atlas.core.util.SmallHashMap
See theSmallHashMap companion object
final class SmallHashMap[K, V] extends Map[K, V]

Simple immutable hash map implementation intended for use-cases where the number of entries is known to be small. This implementation is backed by a single array and uses open addressing with linear probing to resolve conflicts. The underlying array is created to exactly fit the data size so hash collisions tend to be around 50%, but have a fairly low number of probes to find the actual entry. With a cheap equals function for the keys lookups should be fast and there is low memory overhead.

You probably don't want to use this implementation if you expect more than around 50 keys in the map. If you have millions of small immutable maps, such as tag data associated with metrics, it may be a good fit.

Value parameters

data

array with the items

dataLength

number of pairs contained within the array starting at index 0.

Attributes

Companion
object
Graph
Supertypes
trait Map[K, V]
trait MapOps[K, V, Map, Map[K, V]]
trait Map[K, V]
trait Equals
trait MapFactoryDefaults[K, V, Map, Iterable]
trait MapOps[K, V, Map, Map[K, V]]
trait PartialFunction[K, V]
trait K => V
trait Iterable[(K, V)]
trait Iterable[(K, V)]
trait IterableFactoryDefaults[(K, V), Iterable]
trait IterableOps[(K, V), Iterable, Map[K, V]]
trait IterableOnceOps[(K, V), Iterable, Map[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def ++(m: Map[K, V]): Map[K, V]
def asJavaMap: Map[K, V]

Returns a wrapper that adheres to the java Map interface. This wrapper helps to avoid unnecessary allocation of Option

Returns a wrapper that adheres to the java Map interface. This wrapper helps to avoid unnecessary allocation of Option

Attributes

override def contains(key: K): Boolean

Attributes

Definition Classes
MapOps
override def equals(obj: Any): Boolean

Overridden to get better performance. See SmallHashMapEquals benchmark for a comparison with the default for various inputs.

Overridden to get better performance. See SmallHashMapEquals benchmark for a comparison with the default for various inputs.

Attributes

Definition Classes
Map -> Equals -> Any
def find(f: (K, V) => Boolean): Option[(K, V)]
override def foreach[U](f: ((K, V)) => U): Unit

Attributes

Definition Classes
IterableOnceOps
override def foreachEntry[U](f: (K, V) => U): Unit

Call the function f for each tuple in the map without requiring a temporary object to be created.

Call the function f for each tuple in the map without requiring a temporary object to be created.

Attributes

Definition Classes
MapOps
override def get(key: K): Option[V]

Attributes

Definition Classes
MapOps
def getOrNull(key: K): V
override def hashCode: Int

Overridden to get better performance. See SmallHashMapHashCode benchmark for a comparison with the default for various inputs.

Overridden to get better performance. See SmallHashMapHashCode benchmark for a comparison with the default for various inputs.

Attributes

Definition Classes
Map -> Any
override def isEmpty: Boolean

Constant time operation to check if the map is empty

Constant time operation to check if the map is empty

Attributes

Definition Classes
IterableOnceOps
def iterator: Iterator[(K, V)]
override def keysIterator: Iterator[K]

Attributes

Definition Classes
MapOps
def numCollisions: Int

Returns the number of keys that are not in the correct position based on their hash code.

Returns the number of keys that are not in the correct position based on their hash code.

Attributes

def numProbesPerKey: Double

Returns the average number of probes that are required for looking up keys in this map. In general we want this number to be less than N/4. If we naively did a linear scan of the full data it would be N/2.

Returns the average number of probes that are required for looking up keys in this map. In general we want this number to be less than N/4. If we naively did a linear scan of the full data it would be N/2.

Attributes

def removed(key: K): Map[K, V]
override def size: Int

Constant time operation to get the number of pairs in the map.

Constant time operation to get the number of pairs in the map.

Attributes

Definition Classes
IterableOnceOps
def updated[V1 >: V](k: K, v: V1): Map[K, V1]
override def valuesIterator: Iterator[V]

Attributes

Definition Classes
MapOps

Deprecated methods

def foreachItem(f: (K, V) => Unit): Unit

Call the function f for each tuple in the map without requiring a temporary object to be created.

Call the function f for each tuple in the map without requiring a temporary object to be created.

Attributes

Deprecated
true

Inherited methods

override def +[V1 >: V](kv: (K, V1)): Map[K, V1]

Attributes

Definition Classes
MapOps -> MapOps
Inherited from:
MapOps
final def ++[B >: (K, V)](suffix: IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def ++[V2 >: V](xs: IterableOnce[(K, V2)]): Map[K, V2]

Attributes

Inherited from:
MapOps
final def -(key: K): Map[K, V]

Attributes

Inherited from:
MapOps
final override def --(keys: IterableOnce[K]): Map[K, V]

Attributes

Definition Classes
MapOps -> MapOps
Inherited from:
MapOps
final def addString(b: StringBuilder): b.type

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): b.type

Attributes

Inherited from:
IterableOnceOps
override def addString(sb: StringBuilder, start: String, sep: String, end: String): sb.type

Attributes

Definition Classes
MapOps -> IterableOnceOps
Inherited from:
MapOps
def andThen[C](k: PartialFunction[V, C]): PartialFunction[K, C]

Attributes

Inherited from:
PartialFunction
override def andThen[C](k: V => C): PartialFunction[K, C]

Attributes

Definition Classes
PartialFunction -> Function1
Inherited from:
PartialFunction
def apply(key: K): V

Attributes

Inherited from:
MapOps
override def applyOrElse[K1 <: K, V1 >: V](x: K1, default: K1 => V1): V1

Attributes

Definition Classes
MapOps -> PartialFunction
Inherited from:
MapOps
def canEqual(that: Any): Boolean

Attributes

Inherited from:
Map
def collect[B](pf: PartialFunction[(K, V), B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def collect[K2, V2](pf: PartialFunction[(K, V), (K2, V2)]): Map[K2, V2]

Attributes

Inherited from:
MapOps
def collectFirst[B](pf: PartialFunction[(K, V), B]): Option[B]

Attributes

Inherited from:
IterableOnceOps
def compose[R](k: PartialFunction[R, K]): PartialFunction[R, V]

Attributes

Inherited from:
PartialFunction
def compose[A](g: A => K): A => V

Attributes

Inherited from:
Function1
def concat[B >: (K, V)](suffix: IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def concat[V2 >: V](suffix: IterableOnce[(K, V2)]): Map[K, V2]

Attributes

Inherited from:
MapOps
def copyToArray[B >: (K, V)](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: (K, V)](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: (K, V)](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: ((K, V), B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def count(p: ((K, V)) => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
def default(key: K): V

Attributes

Inherited from:
MapOps
def drop(n: Int): Map[K, V]

Attributes

Inherited from:
IterableOps
def dropRight(n: Int): Map[K, V]

Attributes

Inherited from:
IterableOps
def dropWhile(p: ((K, V)) => Boolean): Map[K, V]

Attributes

Inherited from:
IterableOps
def elementWise: ElementWiseExtractor[K, V]

Attributes

Inherited from:
PartialFunction
override def empty: Map[K, V]

Attributes

Definition Classes
MapFactoryDefaults -> IterableOps
Inherited from:
MapFactoryDefaults
def exists(p: ((K, V)) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def filter(pred: ((K, V)) => Boolean): Map[K, V]

Attributes

Inherited from:
IterableOps
def filterNot(pred: ((K, V)) => Boolean): Map[K, V]

Attributes

Inherited from:
IterableOps
def find(p: ((K, V)) => Boolean): Option[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def flatMap[B](f: ((K, V)) => IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def flatMap[K2, V2](f: ((K, V)) => IterableOnce[(K2, V2)]): Map[K2, V2]

Attributes

Inherited from:
MapOps
def flatten[B](implicit asIterable: ((K, V)) => IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def fold[A1 >: (K, V)](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, (K, V)) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: ((K, V), B) => B): B

Attributes

Inherited from:
IterableOnceOps
def forall(p: ((K, V)) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
override protected def fromSpecific(coll: IterableOnce[(K, V)]): Map[K, V]

Attributes

Definition Classes
MapFactoryDefaults -> IterableOps
Inherited from:
MapFactoryDefaults
def getOrElse[V1 >: V](key: K, default: => V1): V1

Attributes

Inherited from:
MapOps
def groupBy[K](f: ((K, V)) => K): Map[K, Map[K, V]]

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: ((K, V)) => K)(f: ((K, V)) => B): Map[K, Iterable[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: ((K, V)) => K)(f: ((K, V)) => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps
def grouped(size: Int): Iterator[Map[K, V]]

Attributes

Inherited from:
IterableOps
def head: (K, V)

Attributes

Inherited from:
IterableOps
def headOption: Option[(K, V)]

Attributes

Inherited from:
IterableOps
def init: Map[K, V]

Attributes

Inherited from:
IterableOps
def inits: Iterator[Map[K, V]]

Attributes

Inherited from:
IterableOps
def isDefinedAt(key: K): Boolean

Attributes

Inherited from:
MapOps
override def isTraversableAgain: Boolean

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
override def iterableFactory: IterableFactory[Iterable]

Attributes

Definition Classes
Iterable -> Iterable -> IterableOps
Inherited from:
Iterable
override def keySet: Set[K]

Attributes

Definition Classes
MapOps -> MapOps
Inherited from:
MapOps
def keyStepper[S <: Stepper[_]](implicit shape: StepperShape[K, S]): S

Attributes

Inherited from:
MapOps
def keys: Iterable[K]

Attributes

Inherited from:
MapOps
def knownSize: Int

Attributes

Inherited from:
IterableOnce
def last: (K, V)

Attributes

Inherited from:
IterableOps
def lastOption: Option[(K, V)]

Attributes

Inherited from:
IterableOps
def lazyZip[B](that: Iterable[B]): LazyZip2[(K, V), B, Iterable.this.type]

Attributes

Inherited from:
Iterable
def lift: K => Option[V]

Attributes

Inherited from:
PartialFunction
def map[B](f: ((K, V)) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def map[K2, V2](f: ((K, V)) => (K2, V2)): Map[K2, V2]

Attributes

Inherited from:
MapOps
override def mapFactory: MapFactory[Map]

Attributes

Definition Classes
Map -> Map -> MapOps
Inherited from:
Map
def max[B >: (K, V)](implicit ord: Ordering[B]): (K, V)

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: ((K, V)) => B)(implicit ord: Ordering[B]): (K, V)

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: ((K, V)) => B)(implicit ord: Ordering[B]): Option[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: (K, V)](implicit ord: Ordering[B]): Option[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def min[B >: (K, V)](implicit ord: Ordering[B]): (K, V)

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: ((K, V)) => B)(implicit ord: Ordering[B]): (K, V)

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: ((K, V)) => B)(implicit ord: Ordering[B]): Option[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: (K, V)](implicit ord: Ordering[B]): Option[(K, V)]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String

Attributes

Inherited from:
IterableOnceOps
override protected def newSpecificBuilder: Builder[(K, V), Map[K, V]]

Attributes

Definition Classes
MapFactoryDefaults -> IterableOps
Inherited from:
MapFactoryDefaults
def nonEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
def orElse[A1 <: K, B1 >: V](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

Attributes

Inherited from:
PartialFunction
def partition(p: ((K, V)) => Boolean): (Map[K, V], Map[K, V])

Attributes

Inherited from:
IterableOps
def partitionMap[A1, A2](f: ((K, V)) => Either[A1, A2]): (Iterable[A1], Iterable[A2])

Attributes

Inherited from:
IterableOps
def product[B >: (K, V)](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def reduce[B >: (K, V)](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: (K, V)](op: (B, (K, V)) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: (K, V)](op: (B, (K, V)) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: (K, V)](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: (K, V)](op: ((K, V), B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: (K, V)](op: ((K, V), B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def removedAll(keys: IterableOnce[K]): Map[K, V]

Attributes

Inherited from:
MapOps
protected def reversed: Iterable[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def runWith[U](action: V => U): K => Boolean

Attributes

Inherited from:
PartialFunction
def scan[B >: (K, V)](z: B)(op: (B, B) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, (K, V)) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def scanRight[B](z: B)(op: ((K, V), B) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def sizeCompare(that: Iterable[_]): Int

Attributes

Inherited from:
IterableOps
def sizeCompare(otherSize: Int): Int

Attributes

Inherited from:
IterableOps
final def sizeIs: SizeCompareOps

Attributes

Inherited from:
IterableOps
def slice(from: Int, until: Int): Map[K, V]

Attributes

Inherited from:
IterableOps
def sliding(size: Int, step: Int): Iterator[Map[K, V]]

Attributes

Inherited from:
IterableOps
def sliding(size: Int): Iterator[Map[K, V]]

Attributes

Inherited from:
IterableOps
def span(p: ((K, V)) => Boolean): (Map[K, V], Map[K, V])

Attributes

Inherited from:
IterableOps
override def splitAt(n: Int): (Map[K, V], Map[K, V])

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[(K, V), S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: (K, V)](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def tail: Map[K, V]

Attributes

Inherited from:
IterableOps
def tails: Iterator[Map[K, V]]

Attributes

Inherited from:
IterableOps
def take(n: Int): Map[K, V]

Attributes

Inherited from:
IterableOps
def takeRight(n: Int): Map[K, V]

Attributes

Inherited from:
IterableOps
def takeWhile(p: ((K, V)) => Boolean): Map[K, V]

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: ((K, V)) => U): Map[K, V]

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def to[C1](factory: Factory[(K, V), C1]): C1

Attributes

Inherited from:
IterableOnceOps
def toArray[B >: (K, V) : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: (K, V)]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
def toIndexedSeq: IndexedSeq[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def toList: List[(K, V)]

Attributes

Inherited from:
IterableOnceOps
final override def toMap[K2, V2](implicit ev: (K, V) <:< (K2, V2)): Map[K2, V2]

Attributes

Definition Classes
Map -> IterableOnceOps
Inherited from:
Map
def toSeq: Seq[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: (K, V)]: Set[B]

Attributes

Inherited from:
IterableOnceOps
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Map -> Function1 -> Iterable -> Any
Inherited from:
Map
def toVector: Vector[(K, V)]

Attributes

Inherited from:
IterableOnceOps
def transform[W](f: (K, V) => W): Map[K, W]

Attributes

Inherited from:
MapOps
def transpose[B](implicit asIterable: ((K, V)) => Iterable[B]): Iterable[Iterable[B]]

Attributes

Inherited from:
IterableOps
def unapply(a: K): Option[V]

Attributes

Inherited from:
PartialFunction
def unzip[A1, A2](implicit asPair: ((K, V)) => (A1, A2)): (Iterable[A1], Iterable[A2])

Attributes

Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: ((K, V)) => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])

Attributes

Inherited from:
IterableOps
def updatedWith[V1 >: V](key: K)(remappingFunction: (Option[V]) => Option[V1]): Map[K, V1]

Attributes

Inherited from:
MapOps
def valueStepper[S <: Stepper[_]](implicit shape: StepperShape[V, S]): S

Attributes

Inherited from:
MapOps
def values: Iterable[V]

Attributes

Inherited from:
MapOps
override def view: MapView[K, V]

Attributes

Definition Classes
MapOps -> IterableOps
Inherited from:
MapOps
def withDefault[V1 >: V](d: K => V1): Map[K, V1]

Attributes

Inherited from:
Map
def withDefaultValue[V1 >: V](d: V1): Map[K, V1]

Attributes

Inherited from:
Map
override def withFilter(p: ((K, V)) => Boolean): WithFilter[K, V, Iterable, Map]

Attributes

Definition Classes
MapFactoryDefaults -> IterableOps
Inherited from:
MapFactoryDefaults
def zip[B](that: IterableOnce[B]): Iterable[((K, V), B)]

Attributes

Inherited from:
IterableOps
def zipAll[A1 >: (K, V), B](that: Iterable[B], thisElem: A1, thatElem: B): Iterable[(A1, B)]

Attributes

Inherited from:
IterableOps
def zipWithIndex: Iterable[((K, V), Int)]

Attributes

Inherited from:
IterableOps

Deprecated and Inherited methods

def +[V1 >: V](elem1: (K, V1), elem2: (K, V1), elems: (K, V1)*): Map[K, V1]

Attributes

Deprecated
[Since version 2.13.0] Use ++ with an explicit collection argument instead of + with varargs
Inherited from:
MapOps
def ++:[B >: (K, V)](that: IterableOnce[B]): Iterable[B]

Attributes

Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
IterableOps
def ++:[V1 >: V](that: IterableOnce[(K, V1)]): Map[K, V1]

Attributes

Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
MapOps
def -(key1: K, key2: K, keys: K*): Map[K, V]

Attributes

Deprecated
[Since version 2.13.0] Use -- with an explicit collection
Inherited from:
MapOps
final def /:[B](z: B)(op: (B, (K, V)) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: ((K, V), B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, (K, V)) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.
Inherited from:
IterableOnceOps
def companion: IterableFactory[Iterable]

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
final def copyToBuffer[B >: (K, V)](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
def filterKeys(p: K => Boolean): MapView[K, V]

Attributes

Deprecated
[Since version 2.13.0] Use .view.filterKeys(f). A future version will include a strict version of this method (for now, .view.filterKeys(p).toMap).
Inherited from:
MapOps
def hasDefiniteSize: Boolean

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
def mapValues[W](f: V => W): MapView[K, W]

Attributes

Deprecated
[Since version 2.13.0] Use .view.mapValues(f). A future version will include a strict version of this method (for now, .view.mapValues(f).toMap).
Inherited from:
MapOps
final def repr: Map[K, V]

Attributes

Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
def seq: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterable.seq always returns the iterable itself
Inherited from:
Iterable
final def toIterable: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
Iterable
final def toIterator: Iterator[(K, V)]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[(K, V)]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps
final def toTraversable: Iterable[(K, V)]

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
def view(from: Int, until: Int): View[(K, V)]

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Inherited from:
IterableOps

Concrete fields

val data: Array[Any]