final class Longs extends AnyVal with Idx.I[Long]

Immutable Long Array Wrap

There is Longs alias at Scalqa root, so this class can be universally used without prefix

Ordering
  1. Alphabetic
Inherited
  1. Longs
  2. Idx.I
  3. Idx
  4. Any.Collection
  5. Custom.Array.View
  6. Any.Able.Void
  7. scala.AnyVal
  8. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type

  1. type Longs.TYPE = Idx.I.Longs
    Attributes
    protected
    Definition Classes
    LongsView
  2. abstract type scalqa.Idx.I._Trait[A] <: Idx.I[Long]
    Attributes
    protected
    Definition Classes
    _Trait

Constant

  1. val base: scala.Array[Long]
    Attributes
    protected
    Definition Classes
    LongsView

Method

  1. def all: ~[Long]

    Returns a Stream of all elements

    Returns a Stream of all elements

    The element order is same as in the Idx.

    val index = Idx.*(1,3,5,7)
    index.all.lp
    // Output
    ~(1, 3, 5, 7)
    Definition Classes
    Longs_Trait_Trait
  2. def apply(i: Int): Long

    Returns element at position

    Returns element at position

    Definition Classes
    Longs_TraitView
  3. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  4. def contains(v: Long): Boolean

    Inclusion check

    Inclusion check

    Returns true if specified value is contained within

    Definition Classes
    _TraitView
  5. def copy(r: Idx.Range): Longs

    Copy range

    Copy range

    Copies elements within the range specified

    ('A' <> 'Z').all.toArray.copy(3 <> 10).all.lp  // Prints: ~(D, E, F, G, H, I, J, K)
    Definition Classes
    LongsView
  6. def copyDrop(r: Idx.Range): Longs

    Copy without range

    Copy without range

    Copies elements outside the range specified

    ('A' <> 'Z').all.toArray.copyDrop(3 <> 20).all.lp // Prints: ~(A, B, C, V, W, X, Y, Z)
    Definition Classes
    LongsView
  7. def copyFirst(number: Int): Longs.TYPE

    Copy start

    Copy start

    Copies specified number of first elements

    ('A' <> 'Z').all.toArray.copyFirst(5).all.lp  // Prints: ~(A, B, C, D, E)
    Definition Classes
    View
  8. def copyFrom(position: Int): Longs.TYPE

    Copy end

    Copy end

    Copies elements from specified position to the end

    ('A' <> 'Z').all.toArray.copyFrom(20).all.lp  // Prints: ~(U, V, W, X, Y, Z)
    Definition Classes
    View
  9. def copyFull: Longs.TYPE

    Copy everything

    Copy everything

    Copies entire content

    Definition Classes
    View
  10. def copyLast(number: Int): Longs.TYPE

    Copy end

    Copy end

    Copies specified number of elements at the end

    ('A' <> 'Z').all.toArray.copyLast(5).all.lp  // Prints: ~(V, W, X, Y, Z)
    Definition Classes
    View
  11. def copyShort(cnt: Int): Longs.TYPE

    Copy without end

    Copy without end

    Copies from the beginning, missing specified number of elements at the end

    ('A' <> 'Z').all.toArray.copyShort(20).all.lp  // Prints: ~(A, B, C, D, E, F)
    Definition Classes
    View
  12. def copyTo(destArray: scala.Array[_ >: Long], destPos: Int = 0, srcRangeOpt: Opt[Idx.Range] = \/): Int

    Copy to another array

    Copy to another array

    Copies elements to target array

    Definition Classes
    View
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def isVoid: Boolean

    Void check

    Void check

    Returns true if this instance is void

    Definition Classes
    ViewVoid
  15. def make: (scala.Array[Long]) ⇒ Longs
    Definition Classes
    LongsView
  16. def size: Int

    Number of elements

    Number of elements

    Readily available, not calculated element count

    Idx.*(1,3,5,7).size.lp  // Prints: 4
    Definition Classes
    Longs_TraitView
  17. def toArray(implicit t: ClassTag[Long]): scala.Array[Long]

    Copy to Array

    Copy to Array

    Copies all elements to a new Array

    Definition Classes
    LongsView
  18. final def toRaw[TRGT <: Idx.I[Long]](implicit c: Raw[Long, TRGT]): TRGT

    To primitive immutable

    To primitive immutable

    Converts this to primitive immutable

    Supported targets are:

    val r : Refs[Int] = (1 <> 10).all.to[Refs]
    
    val i : Ints = r.toRaw[Ints]
    Definition Classes
    _Trait
  19. def toString(): String

    Description

    Description

    Provides description of size and array type

    Definition Classes
    View → Any

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def +(v: Long): Longs

    Plus

    Plus

    Creates a new instance with value added

    // Generic Refs example
    val a1: Refs[Char] = Refs.*('a', 'b', 'c')
    val a2: Refs[Char] = a1 + 'x' + 'y' + 'z'
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(a, b, c, x, y, z)
    Definition Classes
    LongsView
  4. def +@(i: Int, v: Long): Longs

    Plus at position

    Plus at position

    Creates a new instance with specified value added at specified position

    val a1: Chars = Chars.*('a', 'b', 'c')
    val a2: Chars = a1 +@ (3, 'Z') +@ (1, 'X')
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(a, X, b, c, Z)
    Definition Classes
    LongsView
  5. def +~(v: ~[Long]): Longs

    Plus all

    Plus all

    Creates a new instance with added stream values

    val a1: Refs[Char] = Refs.*('a', 'b', 'c')
    val a2: Refs[Char] = a1 +~ ~.*('x', 'y', 'z') +~ ('x' <> 'z')
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(a, b, c, x, y, z, x, y, z)
    Definition Classes
    LongsView
  6. def +~@(i: Int, v: ~[Long]): Longs

    Plus stream at position

    Plus stream at position

    Creates a new instance with stream values added at specified position

    val a1: Refs[Char] = Refs.*('a', 'b', 'c')
    val a2: Refs[Char] = a1 +~@ (3, 'X' <> 'Z') +~@ (0, 'W' ~+ 'W' + 'W')
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(W, W, W, a, b, c, X, Y, Z)
    Definition Classes
    LongsView
  7. def -(v: Long): Longs

    Subtract value

    Subtract value

    Creates a new instance with specified value removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 - 'b' - 'd' - 'f'
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, c, e, g)
    Definition Classes
    LongsView
  8. def -@(position: Int): Longs.TYPE

    Subtract position

    Subtract position

    Creates a new instance with given position removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 -~ ('c' <> 'e')
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, b, f, g)
    Definition Classes
    View
  9. def -@(r: Idx.Range): Longs.TYPE

    Subtract range

    Subtract range

    Creates a new instance with elements within range removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 -~ ('c' <> 'e')
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, b, f, g)
    Definition Classes
    View
  10. def -~(v: ~[Long]): Longs

    Subtract all values

    Subtract all values

    Creates a new instance with all stream values removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 -~ ('c' <> 'e')
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, b, f, g)
    Definition Classes
    LongsView
  11. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
Linear Supertypes
Idx.I[Long], Idx[Long], Any.Collection[Long], Custom.Array.View[Long], Any.Able.Void, AnyVal, Any
Source: Longs.scala