class IterableDecorator[C, I <: IsIterable[C]] extends AnyRef
- Alphabetic
- By Inheritance
- IterableDecorator
- AnyRef
- Any
- by MapDecorator
- by SeqDecorator
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new IterableDecorator(coll: C)(implicit it: I)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toany2stringadd[IterableDecorator[C, I]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (IterableDecorator[C, I], B)
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toArrowAssoc[IterableDecorator[C, I]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def ensuring(cond: (IterableDecorator[C, I]) => Boolean, msg: => Any): IterableDecorator[C, I]
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toEnsuring[IterableDecorator[C, I]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (IterableDecorator[C, I]) => Boolean): IterableDecorator[C, I]
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toEnsuring[IterableDecorator[C, I]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): IterableDecorator[C, I]
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toEnsuring[IterableDecorator[C, I]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): IterableDecorator[C, I]
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toEnsuring[IterableDecorator[C, I]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foldSomeLeft[B](z: B)(op: (B, I.A) => Option[B]): B
Left to right fold that stops if the combination function
op
returnsNone
Left to right fold that stops if the combination function
op
returnsNone
- B
the result type of the binary operator
- z
the start value
- op
the binary operator
- returns
the result of inserting
op
between consecutive elements of the collection, going left to right with the start valuez
on the left, and stopping when all the elements have been traversed or earlier if the operator returnsNone
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toStringFormat[IterableDecorator[C, I]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
- final def fullOuterJoin[W, That]: ([W, That](other: scala.collection.Map[_1.map.K,W])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, (Option[_1.map.V], Option[W])),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Alias for
mergeByKey
Alias for
mergeByKey
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def intersperse[B >: SeqDecorator.S.A, That]: ([B, That](start: B, sep: B, end: B)(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],B,That])That) forSome {val _1: SeqDecorator[IterableDecorator[C, I], seq.type]}
Adds the element
sep
between each element of the sequence, prependingstart
and appendingend
.Adds the element
sep
between each element of the sequence, prependingstart
and appendingend
. If the sequence has less than two elements, returnsstart +: this :+ end
.- B
the element type of the returned collection
- returns
a new collection consisting of all elements of this collection interspersed with the element
sep
, beginning withstart
and ending withend
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toSeqDecorator[IterableDecorator[C, I], seq.type] performed by method SeqDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsSeq[IterableDecorator[C, I]] is in scope.
- Definition Classes
- SeqDecorator
List(1, 2, 3, 4).intersperse(-1, 0, 5) => List(-1, 1, 0, 2, 0, 3, 0, 4, 5)
Example: - def intersperse[B >: SeqDecorator.S.A, That]: ([B, That](sep: B)(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],B,That])That) forSome {val _1: SeqDecorator[IterableDecorator[C, I], seq.type]}
Adds the element
sep
between each element of the sequence.Adds the element
sep
between each element of the sequence. If the sequence has less than two elements, the collection is unchanged.- B
the element type of the returned collection
- returns
a new collection consisting of all elements of this collection interspersed with the element
sep
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toSeqDecorator[IterableDecorator[C, I], seq.type] performed by method SeqDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsSeq[IterableDecorator[C, I]] is in scope.
- Definition Classes
- SeqDecorator
List(1, 2, 3, 4).intersperse(0) = List(1, 0, 2, 0, 3, 0, 4)
Example: - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val it: I
- final def join[W, That]: ([W, That](other: scala.collection.Map[_1.map.K,W])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, (_1.map.V, W)),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Alias for
zipByKey
Alias for
zipByKey
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- Annotations
- @inline()
- def lazyFoldLeft[B](z: B)(op: (B, => I.A) => B): B
Lazy left to right fold.
Lazy left to right fold. Like
foldLeft
but the combination functionop
is non-strict in its second parameter. Ifop(b, a)
chooses not to evaluatea
and returnsb
, this terminates the traversal early.- B
the result type of the binary operator
- z
the start value
- op
the binary operator
- returns
the result of inserting
op
between consecutive elements of the collection, going left to right with the start valuez
on the left, and stopping when all the elements have been traversed or earlier ifop(b, a)
choose not to evaluatea
and returnsb
- def lazyFoldRight[B](z: B)(op: (I.A) => Either[B, (B) => B]): B
Right to left fold that can be interrupted before traversing the whole collection.
Right to left fold that can be interrupted before traversing the whole collection.
- B
the result type
- z
the start value
- op
the operator
- returns
the result of applying the operator between consecutive elements of the collection, going right to left, with the start value
z
on the right. The result of the application of the functionop
to each element drives the process: if it returnsLeft(result)
, thenresult
is returned without iterating further; if it returnsRight(f)
, the functionf
is applied to the previous result to produce the new result and the fold continues.
- def leftOuterJoin[W, That]: ([W, That](other: scala.collection.Map[_1.map.K,W])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, (_1.map.V, Option[W])),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Perform a left outer join of
this
andthat
.Perform a left outer join of
this
andthat
.Equivalent to
mergeByKeyWith(that) { case (Some(v), maybeW) => (v, maybeW) }
.- W
Type of values of
that
- That
Type of the resulting collection
- returns
A Map that associates all the keys
k
ofthis
to pairs(v, Some(w))
ifthat
associatesk
tow
, or(v, None)
ifthat
doesn’t containk
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- implicit val map: map.type
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- final def mergeByKey[W, That]: ([W, That](other: scala.collection.Map[_1.map.K,W])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, (Option[_1.map.V], Option[W])),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Perform a full outer join of
this
andthat
.Perform a full outer join of
this
andthat
.Equivalent to
mergeByKeyWith(that) { case any => any }
.- W
Type of values of
that
(e.g.String
)- That
Type of the resulting collection (e.g.
Map[Int, (Option[Boolean], Option[String])]
)- returns
A Map that associates all the keys
k
ofthis
orthat
to pairs(Some(v), Some(w))
ifthis
associatesk
tov
andthat
associatesk
tow
, or pairs(None, Some(w))
ifthis
doesn’t containk
, or pairs(Some(v), None)
ifthat
doesn’t containk
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- Annotations
- @inline()
- def mergeByKeyWith[W, X, That]: ([W, X, That](other: scala.collection.Map[_1.map.K,W])(f: PartialFunction[(Option[_1.map.V], Option[W]),X])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, X),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
- W
Type of values of the other Map (e.g.
Int
,String
)- X
Type of values of the resulting Map
- That
Type of the result (e.g.
Map[Int, (String, Option[Boolean])]
)- returns
A Map associating all the keys from
this
andthat
with values returned by the partial functionf
, when this one is defined.
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def replaced[B >: SeqDecorator.S.A, That]: ([B, That](elem: B, replacement: B)(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],B,That])That) forSome {val _1: SeqDecorator[IterableDecorator[C, I], seq.type]}
Produces a new sequence where all occurrences of some element are replaced by a different element.
Produces a new sequence where all occurrences of some element are replaced by a different element.
- B
the element type of the returned collection.
- returns
a new sequence consisting of all elements of this sequence except that all occurrences of
elem
are replaced byreplacement
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toSeqDecorator[IterableDecorator[C, I], seq.type] performed by method SeqDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsSeq[IterableDecorator[C, I]] is in scope.
- Definition Classes
- SeqDecorator
- def rightOuterJoin[W, That]: ([W, That](other: scala.collection.Map[_1.map.K,W])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, (Option[_1.map.V], W)),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Perform a right outer join of
this
andthat
.Perform a right outer join of
this
andthat
.Equivalent to
mergeByKeyWith(that) { case (maybeV, Some(w)) => (maybeV, w) }
.- W
Type of values of
that
(e.g.String
)- That
Type of the resulting collection (e.g.
Map[Int, (Option[Boolean], String)]
)- returns
A Map that associates all the keys
k
ofthat
to pairs(Some(v), w)
ifthis
associatesk
tov
, or(None, w)
ifthis
doesn’t containk
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- implicit val seq: seq.type
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toSeqDecorator[IterableDecorator[C, I], seq.type] performed by method SeqDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsSeq[IterableDecorator[C, I]] is in scope.
- Definition Classes
- SeqDecorator
- def splitBy[K, CC1, CC2](f: (I.A) => K)(implicit bf: BuildFrom[C, I.A, CC1], bff: BuildFrom[C, CC1, CC2]): CC2
Constructs a collection where consecutive elements are accumulated as long as the output of f for each element doesn't change.
Constructs a collection where consecutive elements are accumulated as long as the output of f for each element doesn't change.
Vector(1,2,2,3,3,3,2,2) .splitBy(identity)
producesVector(Vector(1), Vector(2,2), Vector(3,3,3), Vector(2,2))
- K
the type of the computed key
- f
the function to compute a key for an element
- returns
a collection of collections of the consecutive elements with the same key in the original collection
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def zipByKey[W, That]: ([W, That](other: scala.collection.Map[_1.map.K,W])(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, (_1.map.V, W)),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Combines the entries of
this
Map with the entries ofthat
Map that have the same key, tupling their values.Combines the entries of
this
Map with the entries ofthat
Map that have the same key, tupling their values.xs.zipByKey(ys)
is a shorthand forxs.zipByKeyWith(ys)((_, _))
.- W
Type of values of the other Map (e.g.
Int
,String
)- That
Type of the result (e.g.
Map[Int, (String, Boolean)]
,TreeMap[String, (Int, Int)]
)- returns
A Map that associates all the keys
k
contained by boththis
andthat
to pairs(v, w)
wherev
is the value associated bythis
tok
andw
the value associated bythat
tok
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
- def zipByKeyWith[W, X, That]: ([W, X, That](other: scala.collection.Map[_1.map.K,W])(f: (_1.map.V, W) => X)(implicit bf: scala.collection.BuildFrom[scala.collection.decorators.IterableDecorator[C,I],(_1.map.K, X),That])That) forSome {val _1: MapDecorator[IterableDecorator[C, I], map.type]}
Combines entries of
this
Map with entries ofthat
Map that have the same key, using the combination functionf
Combines entries of
this
Map with entries ofthat
Map that have the same key, using the combination functionf
- W
Type of values of the other Map (e.g.
Int
,String
)- X
Type of values of the resulting Map
- That
Type of the resulting Map
- returns
A Map that associates all the keys
k
contained by boththis
andthat
to the result of the application off
to the valuesv
andw
respectively associated bythis
andthat
tok
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toMapDecorator[IterableDecorator[C, I], map.type] performed by method MapDecorator in scala.collection.decorators.This conversion will take place only if an implicit value of type IsMap[IterableDecorator[C, I]] is in scope.
- Definition Classes
- MapDecorator
Deprecated Value Members
- def →[B](y: B): (IterableDecorator[C, I], B)
- Implicit
- This member is added by an implicit conversion from IterableDecorator[C, I] toArrowAssoc[IterableDecorator[C, I]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.