Class

special.collection

PairOfCols

Related Doc: package collection

Permalink

class PairOfCols[L, R] extends PairColl[L, R]

Linear Supertypes
PairColl[L, R], Coll[(L, R)], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PairOfCols
  2. PairColl
  3. Coll
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PairOfCols(ls: Coll[L], rs: Coll[R])

    Permalink

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 append(other: Coll[(L, R)]): Coll[(L, R)]

    Permalink

    Puts the elements of other collection after the elements of this collection (concatenation of 2 collections)

    Puts the elements of other collection after the elements of this collection (concatenation of 2 collections)

    Definition Classes
    PairOfColsColl
  5. def apply(i: Int): (L, R)

    Permalink

    The element at given index.

    The element at given index. Indices start at 0; xs.apply(0) is the first element of collection xs. Note the indexing syntax xs(i) is a shorthand for xs.apply(i).

    i

    the index

    returns

    the element at the given index

    Definition Classes
    PairOfColsColl
    Annotations
    @inline()
    Exceptions thrown

    ArrayIndexOutOfBoundsException if i < 0 or length <= i

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def builder: CollBuilder

    Permalink
    Definition Classes
    PairOfColsColl
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def diff(that: Coll[(L, R)]): Coll[(L, R)]

    Permalink

    Computes the multiset difference between this collection and another sequence.

    Computes the multiset difference between this collection and another sequence.

    that

    the sequence of elements to remove

    returns

    a new collection which contains all elements of this collection except some of occurrences of elements that also appear in that. If an element value x appears n times in that, then the first n occurrences of x will not form part of the result, but any following occurrences will.

    Definition Classes
    Coll
    Annotations
    @NeverInline()
    Since

    2.0

  10. def distinctByKey[T, U](implicit ev: <:<[(L, R), (T, U)]): Coll[(L, R)]

    Permalink
    Definition Classes
    Coll
    Annotations
    @Internal()
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    PairOfCols → AnyRef → Any
    Annotations
    @Internal()
  13. def exists(p: ((L, R)) ⇒ Boolean): Boolean

    Permalink

    Tests whether a predicate holds for at least one element of this collection.

    Tests whether a predicate holds for at least one element of this collection.

    p

    the predicate used to test elements.

    returns

    true if the given predicate p is satisfied by at least one element of this collection, otherwise false

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  14. def filter(p: ((L, R)) ⇒ Boolean): Coll[(L, R)]

    Permalink

    Selects all elements of this collection which satisfy a predicate.

    Selects all elements of this collection which satisfy a predicate.

    p

    the predicate used to test elements.

    returns

    a new collection consisting of all elements of this collection that satisfy the given predicate p. The order of the elements is preserved.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def find(p: ((L, R)) ⇒ Boolean): Option[(L, R)]

    Permalink

    Finds the first element of the collection satisfying a predicate, if any.

    Finds the first element of the collection satisfying a predicate, if any.

    p

    the predicate used to test elements.

    returns

    an option value containing the first element in the collection that satisfies p, or None if none exists.

    Definition Classes
    Coll
    Annotations
    @NeverInline()
    Since

    2.0

  17. def flatMap[B](f: ((L, R)) ⇒ Coll[B])(implicit arg0: RType[B]): Coll[B]

    Permalink

    Builds a new collection by applying a function to all elements of this collection and using the elements of the resulting collections.

    Builds a new collection by applying a function to all elements of this collection and using the elements of the resulting collections.

    Function f is constrained to be of the form x => x.someProperty, otherwise it is illegal.

    B

    the element type of the returned collection.

    f

    the function to apply to each element.

    returns

    a new collection of type Coll[B] resulting from applying the given collection-valued function f to each element of this collection and concatenating the results.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  18. def foldLeft[B](zero: B, op: ((B, (L, R))) ⇒ B): B

    Permalink

    Applies a binary operator to a start value and all elements of this collection, going left to right.

    Applies a binary operator to a start value and all elements of this collection, going left to right.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this collection, going left to right with the start value z on the left:

    op(...op(z, x_1), x_2, ..., x_n)

    where x1, ..., xn are the elements of this collection. Returns z if this collection is empty.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  19. def forall(p: ((L, R)) ⇒ Boolean): Boolean

    Permalink

    Tests whether a predicate holds for all elements of this collection.

    Tests whether a predicate holds for all elements of this collection.

    p

    the predicate used to test elements.

    returns

    true if this collection is empty or the given predicate p holds for all elements of this collection, otherwise false.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getOrElse(i: Int, default: (L, R)): (L, R)

    Permalink

    The element of the collection or default value.

    The element of the collection or default value. If an index is out of bounds (i < 0 || i >= length) then default value is returned.

    i

    the index

    returns

    the element at the given index or default value if index is out or bounds

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  22. def groupBy[K](key: ((L, R)) ⇒ K)(implicit arg0: RType[K]): Coll[(K, Coll[(L, R)])]

    Permalink

    Partitions this collection into a map of collections according to some discriminator function.

    Partitions this collection into a map of collections according to some discriminator function.

    K

    the type of keys returned by the discriminator function.

    key

    the discriminator function.

    returns

    A map from keys to collections such that the following invariant holds:

    (xs groupBy key)(k) = xs filter (x => key(x) == k)

    That is, every key k is bound to a collection of those elements x for which key(x) equals k.

    Definition Classes
    Coll
    Annotations
    @NeverInline()
    Since

    2.0

  23. def groupByProjecting[K, V](key: ((L, R)) ⇒ K, proj: ((L, R)) ⇒ V)(implicit arg0: RType[K], arg1: RType[V]): Coll[(K, Coll[V])]

    Permalink

    Partitions this collection into a map of collections according to some discriminator function.

    Partitions this collection into a map of collections according to some discriminator function. Additionally projecting each element to a new value.

    K

    the type of keys returned by the discriminator function.

    V

    the type of values returned by the projection function.

    key

    the discriminator function.

    proj

    projection function to produce new value for each element of this collection

    returns

    A map from keys to collections such that the following invariant holds:

    (xs groupByProjecting (key, proj))(k) = xs filter (x => key(x) == k).map(proj)

    That is, every key k is bound to projections of those elements x for which key(x) equals k.

    Definition Classes
    Coll
    Annotations
    @NeverInline()
    Since

    2.0

  24. def hashCode(): Int

    Permalink
    Definition Classes
    PairOfCols → AnyRef → Any
    Annotations
    @Internal()
  25. def indexOf(elem: (L, R), from: Int): Int

    Permalink

    Finds index of first occurrence of some value in this collection after or at some start index.

    Finds index of first occurrence of some value in this collection after or at some start index.

    elem

    the element value to search for.

    from

    the start index

    returns

    the index >= from of the first element of this collection that is equal (as determined by ==) to elem, or -1, if none exists.

    Definition Classes
    Coll
    Annotations
    @NeverInline()
    Since

    2.0

  26. def indexWhere(p: ((L, R)) ⇒ Boolean, from: Int): Int

    Permalink

    Finds index of the first element satisfying some predicate after or at some start index.

    Finds index of the first element satisfying some predicate after or at some start index.

    p

    the predicate used to test elements.

    from

    the start index

    returns

    the index >= from of the first element of this collection that satisfies the predicate p, or -1, if none exists.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  27. def indices: Coll[Int]

    Permalink

    Produces the range of all indices of this collection as a new collection containing [0 ..

    Produces the range of all indices of this collection as a new collection containing [0 .. length-1] values.

    Definition Classes
    PairOfColsColl
    Since

    2.0

  28. def intersect(that: Coll[(L, R)]): Coll[(L, R)]

    Permalink

    Computes the multiset intersection between this collection and another sequence.

    Computes the multiset intersection between this collection and another sequence.

    that

    the sequence of elements to intersect with.

    returns

    a new collection which contains all elements of this collection which also appear in that. If an element value x appears n times in that, then the first n occurrences of x will be retained in the result, but any following occurrences will be omitted.

    Definition Classes
    Coll
    Annotations
    @NeverInline()
    Since

    2.0

  29. def isDefinedAt(idx: Int): Boolean

    Permalink

    Tests whether this collection contains given index.

    Tests whether this collection contains given index.

    The implementations of methods apply and isDefinedAt turn a Coll[A] into a PartialFunction[Int, A].

    idx

    the index to test

    returns

    true if this collection contains an element at position idx, false otherwise.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  30. def isEmpty: Boolean

    Permalink

    Tests whether the collection is empty.

    Tests whether the collection is empty.

    returns

    true if the collection contains no elements, false otherwise.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. final def isValidIndex(i: Int): Boolean

    Permalink

    Returns true if the index in the valid range.

    Returns true if the index in the valid range.

    i

    index of an element of this collection

    Definition Classes
    Coll
    Annotations
    @Internal()
  33. def lastIndexWhere(p: ((L, R)) ⇒ Boolean, end: Int): Int

    Permalink

    Finds index of last element satisfying some predicate before or at given end index.

    Finds index of last element satisfying some predicate before or at given end index.

    p

    the predicate used to test elements.

    returns

    the index <= end of the last element of this collection that satisfies the predicate p, or -1, if none exists.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  34. def length: Int

    Permalink

    The length of the collection.

    The length of the collection.

    Definition Classes
    PairOfColsColl
    Annotations
    @inline()
  35. val ls: Coll[L]

    Permalink
    Definition Classes
    PairOfColsPairColl
  36. def map[V](f: ((L, R)) ⇒ V)(implicit arg0: RType[V]): Coll[V]

    Permalink

    Builds a new collection by applying a function to all elements of this collection.

    Builds a new collection by applying a function to all elements of this collection.

    f

    the function to apply to each element.

    returns

    a new collection of type Coll[B] resulting from applying the given function f to each element of this collection and collecting the results.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  37. def mapFirst[T1](f: (L) ⇒ T1)(implicit arg0: RType[T1]): Coll[(T1, R)]

    Permalink
    Definition Classes
    PairOfColsPairColl
    Annotations
    @NeverInline()
  38. def mapReduce[K, V](m: ((L, R)) ⇒ (K, V), r: ((V, V)) ⇒ V)(implicit arg0: RType[K], arg1: RType[V]): Coll[(K, V)]

    Permalink

    Apply m for each element of this collection, group by key and reduce each group using r.

    Apply m for each element of this collection, group by key and reduce each group using r.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  39. def mapSecond[T1](f: (R) ⇒ T1)(implicit arg0: RType[T1]): Coll[(L, T1)]

    Permalink
    Definition Classes
    PairOfColsPairColl
    Annotations
    @NeverInline()
  40. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  41. def nonEmpty: Boolean

    Permalink

    Tests whether the collection is not empty.

    Tests whether the collection is not empty.

    returns

    true if the collection contains at least one element, false otherwise.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  42. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  44. def partition(pred: ((L, R)) ⇒ Boolean): (Coll[(L, R)], Coll[(L, R)])

    Permalink

    Partitions this collection in two collections according to a predicate.

    Partitions this collection in two collections according to a predicate.

    pred

    the predicate on which to partition.

    returns

    a pair of collections: the first collection consists of all elements that satisfy the predicate p and the second collection consists of all elements that don't. The relative order of the elements in the resulting collections will BE preserved (this is different from Scala's version of this method).

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  45. def patch(from: Int, patch: Coll[(L, R)], replaced: Int): Coll[(L, R)]

    Permalink

    Produces a new collection where a slice of elements in this collection is replaced by another sequence.

    Produces a new collection where a slice of elements in this collection is replaced by another sequence.

    from

    the index of the first replaced element

    patch

    the replacement sequence

    replaced

    the number of elements to drop in the original collection

    returns

    a new collection consisting of all elements of this collection except that replaced elements starting from from are replaced by patch.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  46. def reverse: Coll[(L, R)]

    Permalink

    Returns new collection with elements in reversed order.

    Returns new collection with elements in reversed order.

    returns

    A new collection with all elements of this collection in reversed order.

    Definition Classes
    PairOfColsColl
  47. val rs: Coll[R]

    Permalink
    Definition Classes
    PairOfColsPairColl
  48. def segmentLength(p: ((L, R)) ⇒ Boolean, from: Int): Int

    Permalink

    Computes length of longest segment whose elements all satisfy some predicate.

    Computes length of longest segment whose elements all satisfy some predicate.

    p

    the predicate used to test elements.

    from

    the index where the search starts.

    returns

    the length of the longest segment of this collection starting from index from such that every element of the segment satisfies the predicate p.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  49. def size: Int

    Permalink

    The size of the collection in elements.

    The size of the collection in elements.

    Definition Classes
    Coll
  50. def slice(from: Int, until: Int): PairColl[L, R]

    Permalink

    Selects an interval of elements.

    Selects an interval of elements. The returned collection is made up of all elements x which satisfy the invariant:

    from <= indexOf(x) < until
    from

    the lowest index to include from this collection.

    until

    the lowest index to EXCLUDE from this collection.

    Definition Classes
    PairOfColsColl
  51. def sum(m: Monoid[(L, R)]): (L, R)

    Permalink

    Folding through all elements of this collection starting from m.zero and applying m.plus to accumulate resulting value.

    Folding through all elements of this collection starting from m.zero and applying m.plus to accumulate resulting value.

    m

    monoid object to use for summation

    returns

    result of the following operations (m.zero m.plus x1 m.plus x2 m.plus ... xN)

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. lazy val tItem: RType[(L, R)]

    Permalink
    Definition Classes
    PairOfColsColl
  54. implicit def tL: RType[L]

    Permalink
    Annotations
    @Internal() @inline()
  55. implicit def tR: RType[R]

    Permalink
    Annotations
    @Internal() @inline()
  56. def take(n: Int): Coll[(L, R)]

    Permalink

    Selects first n elements.

    Selects first n elements.

    n

    the number of elements to take from this collection.

    returns

    a collection consisting only of the first n elements of this collection, or else the whole collection, if it has less than n elements. If n is negative, returns an empty collection.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
  57. def toArray: Array[(L, R)]

    Permalink
    Definition Classes
    PairOfColsColl
  58. def toMap[T, U](implicit ev: <:<[(L, R), (T, U)]): Map[T, U]

    Permalink
    Definition Classes
    Coll
    Annotations
    @Internal()
  59. def toString(): String

    Permalink
    Definition Classes
    Coll → AnyRef → Any
    Annotations
    @Internal()
  60. def unionSet(that: Coll[(L, R)]): Coll[(L, R)]

    Permalink

    Produces a new collection which contains all distinct elements of this collection and also all elements of a given collection that are not in this collection.

    Produces a new collection which contains all distinct elements of this collection and also all elements of a given collection that are not in this collection. This is order preserving operation considering only first occurrences of each distinct elements. Any collection xs can be transformed to a sequence with distinct elements by using xs.unionSet(Col()).

    NOTE: Use append if you don't need set semantics.

    that

    the collection to add.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  61. def unionSetByKey[T, U](that: Coll[(L, R)])(implicit ev: <:<[(L, R), (T, U)]): Coll[(L, R)]

    Permalink
    Definition Classes
    Coll
    Annotations
    @Internal()
  62. def updateMany(indexes: Coll[Int], values: Coll[(L, R)]): Coll[(L, R)]

    Permalink

    Returns a copy of this collection where elements at indexes are replaced with values.

    Returns a copy of this collection where elements at indexes are replaced with values.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

  63. def updated(index: Int, elem: (L, R)): Coll[(L, R)]

    Permalink

    A copy of this collection with one single replaced element.

    A copy of this collection with one single replaced element.

    index

    the position of the replacement

    elem

    the replacing element

    returns

    a new collection which is a copy of this collection with the element at position index replaced by elem.

    Definition Classes
    PairOfColsColl
    Annotations
    @NeverInline()
    Since

    2.0

    Exceptions thrown

    IndexOutOfBoundsException if index does not satisfy 0 <= index < length.

  64. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. def zip[B](ys: Coll[B]): PairColl[(L, R), B]

    Permalink

    For this collection (x0, ..., xN) and other collection (y0, ..., yM) produces a collection ((x0, y0), ..., (xK, yK)) where K = min(N, M)

    For this collection (x0, ..., xN) and other collection (y0, ..., yM) produces a collection ((x0, y0), ..., (xK, yK)) where K = min(N, M)

    Definition Classes
    PairOfColsColl

Inherited from PairColl[L, R]

Inherited from Coll[(L, R)]

Inherited from AnyRef

Inherited from Any

Ungrouped