Trait/Object

com.github.arturopala.bufferandslice

Slice

Related Docs: object Slice | package bufferandslice

Permalink

trait Slice[T] extends (Int) ⇒ T

Lazy, immutable slice of a sequence of values.

T

type of the items of the sequence.

Linear Supertypes
(Int) ⇒ T, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Slice
  2. Function1
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(index: Int): T

    Permalink

    Returns value at the given index.

    Returns value at the given index.

    Definition Classes
    Slice → Function1
  2. abstract def asIterable: Iterable[T]

    Permalink

    Returns new iterable of Slice values.

  3. abstract def copyToArray[T1 >: T](targetIndex: Int, targetArray: Array[T1]): Array[T1]

    Permalink

    Dumps content to the array, starting from an index.

  4. abstract def count(pred: (T) ⇒ Boolean): Int

    Permalink

    Counts values fulfilling the predicate.

  5. abstract def drop(n: Int): Slice[T]

    Permalink

    Lazily narrows Slice to exclude first N items.

  6. abstract def dropRight(n: Int): Slice[T]

    Permalink

    Lazily narrows Slice to exclude last N items.

  7. abstract def head: T

    Permalink

    Returns first value in the Slice.

  8. abstract def headOption: Option[T]

    Permalink

    Returns first value in the Slice.

  9. abstract def init: Slice[T]

    Permalink

    Returns the Slice without last value.

  10. abstract def isEmpty: Boolean

    Permalink

    Returns true if Slice has values, otherwise false.

  11. abstract def iterator: Iterator[T]

    Permalink

    Returns iterator over Slice values.

  12. abstract def last: T

    Permalink

    Returns the last value in the Slice.

  13. abstract def lastOption: Option[T]

    Permalink

    Returns the last value in the Slice.

  14. abstract def length: Int

    Permalink

    Returns length of the Slice.

  15. abstract def map[K](f: (T) ⇒ K): Slice[K]

    Permalink

    Lazily composes mapping function and returns new Slice.

    Lazily composes mapping function and returns new Slice. Does not modify nor copy underlying array.

  16. abstract def reverseIterator(pred: (T) ⇒ Boolean): Iterator[T]

    Permalink

    Returns iterator over Slice values, fulfilling the predicate, in the reverse order.

  17. abstract def reverseIterator: Iterator[T]

    Permalink

    Returns iterator over Slice values in the reverse order.

  18. abstract def slice(from: Int, to: Int): Slice[T]

    Permalink

    Lazily narrows Slice to provided range.

  19. abstract def tail: Slice[T]

    Permalink

    Returns the Slice without first value.

  20. abstract def take(n: Int): Slice[T]

    Permalink

    Lazily narrows Slice to first N items.

  21. abstract def takeRight(n: Int): Slice[T]

    Permalink

    Lazily narrows Slice to last N items.

  22. abstract def toArray[T1 >: T](implicit arg0: ClassTag[T1]): Array[T1]

    Permalink

    Returns minimal copy of an underlying array, trimmed to the actual range.

  23. abstract def toBuffer(implicit tag: ClassTag[T]): Buffer[T]

    Permalink

    Returns buffer with a copy of this Slice.

  24. abstract def toList: List[T]

    Permalink

    Returns new list of Slice values.

  25. abstract def update(index: Int, value: T)(implicit tag: ClassTag[T]): Slice[T]

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (T) ⇒ A): (Int) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def compose[A](g: (A) ⇒ Int): (A) ⇒ T

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def nonEmpty: Boolean

    Permalink

    Returns true if Slice has values, otherwise false.

    Returns true if Slice has values, otherwise false.

    Annotations
    @inline()
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    Function1 → AnyRef → Any
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from (Int) ⇒ T

Inherited from AnyRef

Inherited from Any

Properties

Access

Transform

Aggregate

Read

Ungrouped