final class Parts[Item] extends Iterable[List[Item]]
Iterable class to iterates (without deterministic order) on nbPart "equals" parts on items from a sequence of sequences. When totalSize is not divisible by nbPart, the firsts parts contain one item more than the lasts. When totalSize <= nbPart, the result is a sequence of totalSize List of one item.
totalSize and nbPart must be > 0 and totalSize must be equals to the total number of items in seqs
By example, Parts(List(Set(1, 2, 3), Set(4, 5, 6, 7, 8, 9, 10), Set(), Set(11, 12)), 12, 5) gives an iterator on List(3, 2, 1), List(6, 5, 4), List(8, 7), List(10, 9), List(12, 11) (with maybe a different order for items from the same set).
TODO: Possible better idea: The order is not important, so it may be possible to access concurrently to seqs and build parts in parallel.
- Alphabetic
- By Inheritance
- Parts
- Iterable
- IterableLike
- Equals
- GenIterable
- GenIterableLike
- Traversable
- GenTraversable
- GenericTraversableTemplate
- TraversableLike
- GenTraversableLike
- Parallelizable
- TraversableOnce
- GenTraversableOnce
- FilterMonadic
- HasNewBuilder
- AnyRef
- Any
- by CollectionsHaveToParArray
- by MonadOps
- by flattenTraversableOnce
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- by alternateImplicit
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Parts(seqs: Iterable[Iterable[Item]], totalSize: Int, nbPart: Int)
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
-
def
++[B >: List[Item], That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
++:[B >: List[Item], That](that: Traversable[B])(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike
-
def
++:[B >: List[Item], That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike
- def ->[B](y: B): (Parts[Item], B)
-
def
/:[B](z: B)(op: (B, List[Item]) ⇒ B): B
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
:\[B](z: B)(op: (List[Item], B) ⇒ B): B
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addString(b: StringBuilder): StringBuilder
- Definition Classes
- TraversableOnce
-
def
addString(b: StringBuilder, sep: String): StringBuilder
- Definition Classes
- TraversableOnce
-
def
addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
- Definition Classes
- TraversableOnce
-
def
aggregate[B](z: ⇒ B)(seqop: (B, List[Item]) ⇒ B, combop: (B, B) ⇒ B): B
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canEqual(that: Any): Boolean
- Definition Classes
- IterableLike → Equals
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
def
collect[B, That](pf: PartialFunction[List[Item], B])(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
collectFirst[B](pf: PartialFunction[List[Item], B]): Option[B]
- Definition Classes
- TraversableOnce
-
def
companion: GenericCompanion[Iterable]
- Definition Classes
- Iterable → GenIterable → Traversable → GenTraversable → GenericTraversableTemplate
-
def
copyToArray[B >: List[Item]](xs: Array[B], start: Int, len: Int): Unit
- Definition Classes
- IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
-
def
copyToArray[B >: List[Item]](xs: Array[B]): Unit
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
copyToArray[B >: List[Item]](xs: Array[B], start: Int): Unit
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
copyToBuffer[B >: List[Item]](dest: Buffer[B]): Unit
- Definition Classes
- TraversableOnce
-
def
count(p: (List[Item]) ⇒ Boolean): Int
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
drop(n: Int): Iterable[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableLike
-
def
dropRight(n: Int): Iterable[List[Item]]
- Definition Classes
- IterableLike
-
def
dropWhile(p: (List[Item]) ⇒ Boolean): Iterable[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
- def ensuring(cond: (Parts[Item]) ⇒ Boolean, msg: ⇒ Any): Parts[Item]
- def ensuring(cond: (Parts[Item]) ⇒ Boolean): Parts[Item]
- def ensuring(cond: Boolean, msg: ⇒ Any): Parts[Item]
- def ensuring(cond: Boolean): Parts[Item]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exists(p: (List[Item]) ⇒ Boolean): Boolean
- Definition Classes
- IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
-
def
filter(p: (List[Item]) ⇒ Boolean): Iterable[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
filterNot(p: (List[Item]) ⇒ Boolean): Iterable[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
find(p: (List[Item]) ⇒ Boolean): Option[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
-
def
flatMap[B, That](f: (List[Item]) ⇒ GenTraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike → FilterMonadic
-
def
flatten[B](implicit asTraversable: (List[Item]) ⇒ GenTraversableOnce[B]): Iterable[B]
- Definition Classes
- GenericTraversableTemplate
-
def
fold[A1 >: List[Item]](z: A1)(op: (A1, A1) ⇒ A1): A1
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
foldLeft[B](z: B)(op: (B, List[Item]) ⇒ B): B
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
foldRight[B](z: B)(op: (List[Item], B) ⇒ B): B
- Definition Classes
- IterableLike → TraversableOnce → GenTraversableOnce
-
def
forall(p: (List[Item]) ⇒ Boolean): Boolean
- Definition Classes
- IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
-
def
foreach[U](f: (List[Item]) ⇒ U): Unit
- Definition Classes
- IterableLike → TraversableLike → GenTraversableLike → TraversableOnce → GenTraversableOnce → FilterMonadic
- def formatted(fmtstr: String): String
-
def
genericBuilder[B]: Builder[B, Iterable[B]]
- Definition Classes
- GenericTraversableTemplate
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
groupBy[K](f: (List[Item]) ⇒ K): Map[K, Iterable[List[Item]]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
grouped(size: Int): Iterator[Iterable[List[Item]]]
- Definition Classes
- IterableLike
-
def
hasDefiniteSize: Boolean
- Definition Classes
- TraversableLike → TraversableOnce → GenTraversableOnce
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
head: List[Item]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableLike
-
def
headOption: Option[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
init: Iterable[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
inits: Iterator[Iterable[List[Item]]]
- Definition Classes
- TraversableLike
-
def
isEmpty: Boolean
- Definition Classes
- IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
isTraversableAgain: Boolean
- Definition Classes
- TraversableLike → GenTraversableLike → GenTraversableOnce
-
def
iterator: Iterator[List[Item]]
- Definition Classes
- Parts → IterableLike → GenIterableLike
-
def
last: List[Item]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
lastOption: Option[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
map[B, That](f: (List[Item]) ⇒ B)(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike → FilterMonadic
-
def
max[B >: List[Item]](implicit cmp: Ordering[B]): List[Item]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
maxBy[B](f: (List[Item]) ⇒ B)(implicit cmp: Ordering[B]): List[Item]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
min[B >: List[Item]](implicit cmp: Ordering[B]): List[Item]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
minBy[B](f: (List[Item]) ⇒ B)(implicit cmp: Ordering[B]): List[Item]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
mkString: String
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
mkString(sep: String): String
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
mkString(start: String, sep: String, end: String): String
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newBuilder: Builder[List[Item], Iterable[List[Item]]]
- Attributes
- protected[this]
- Definition Classes
- GenericTraversableTemplate → HasNewBuilder
-
def
nonEmpty: Boolean
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
par: ParIterable[List[Item]]
- Definition Classes
- Parallelizable
-
def
parCombiner: Combiner[List[Item], ParIterable[List[Item]]]
- Attributes
- protected[this]
- Definition Classes
- TraversableLike → Parallelizable
-
def
partition(p: (List[Item]) ⇒ Boolean): (Iterable[List[Item]], Iterable[List[Item]])
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
product[B >: List[Item]](implicit num: Numeric[B]): B
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
reduce[A1 >: List[Item]](op: (A1, A1) ⇒ A1): A1
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
reduceLeft[B >: List[Item]](op: (B, List[Item]) ⇒ B): B
- Definition Classes
- TraversableOnce
-
def
reduceLeftOption[B >: List[Item]](op: (B, List[Item]) ⇒ B): Option[B]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
reduceOption[A1 >: List[Item]](op: (A1, A1) ⇒ A1): Option[A1]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
reduceRight[B >: List[Item]](op: (List[Item], B) ⇒ B): B
- Definition Classes
- IterableLike → TraversableOnce → GenTraversableOnce
-
def
reduceRightOption[B >: List[Item]](op: (List[Item], B) ⇒ B): Option[B]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
repr: Iterable[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
reversed: List[List[Item]]
- Attributes
- protected[this]
- Definition Classes
- TraversableOnce
-
def
sameElements[B >: List[Item]](that: GenIterable[B]): Boolean
- Definition Classes
- IterableLike → GenIterableLike
-
def
scan[B >: List[Item], That](z: B)(op: (B, B) ⇒ B)(implicit cbf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
scanLeft[B, That](z: B)(op: (B, List[Item]) ⇒ B)(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
scanRight[B, That](z: B)(op: (List[Item], B) ⇒ B)(implicit bf: CanBuildFrom[Iterable[List[Item]], B, That]): That
- Definition Classes
- TraversableLike → GenTraversableLike
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The behavior of
scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
-
def
seq: Iterable[List[Item]]
- Definition Classes
- Iterable → GenIterable → Traversable → GenTraversable → Parallelizable → TraversableOnce → GenTraversableOnce
-
def
size: Int
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
sizeHintIfCheap: Int
- Attributes
- protected[scala.collection]
- Definition Classes
- GenTraversableOnce
-
def
slice(from: Int, until: Int): Iterable[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableLike
-
def
sliding(size: Int, step: Int): Iterator[Iterable[List[Item]]]
- Definition Classes
- IterableLike
-
def
sliding(size: Int): Iterator[Iterable[List[Item]]]
- Definition Classes
- IterableLike
-
def
span(p: (List[Item]) ⇒ Boolean): (Iterable[List[Item]], Iterable[List[Item]])
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
splitAt(n: Int): (Iterable[List[Item]], Iterable[List[Item]])
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
stringPrefix: String
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
sum[B >: List[Item]](implicit num: Numeric[B]): B
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tail: Iterable[List[Item]]
- Definition Classes
- TraversableLike → GenTraversableLike
-
def
tails: Iterator[Iterable[List[Item]]]
- Definition Classes
- TraversableLike
-
def
take(n: Int): Iterable[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableLike
-
def
takeRight(n: Int): Iterable[List[Item]]
- Definition Classes
- IterableLike
-
def
takeWhile(p: (List[Item]) ⇒ Boolean): Iterable[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableLike
-
def
thisCollection: Iterable[List[Item]]
- Attributes
- protected[this]
- Definition Classes
- IterableLike → TraversableLike
-
def
to[Col[_]](implicit cbf: CanBuildFrom[Nothing, List[Item], Col[List[Item]]]): Col[List[Item]]
- Definition Classes
- TraversableLike → TraversableOnce → GenTraversableOnce
-
def
toArray[B >: List[Item]](implicit arg0: ClassTag[B]): Array[B]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toBuffer[B >: List[Item]]: Buffer[B]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toCollection(repr: Iterable[List[Item]]): Iterable[List[Item]]
- Attributes
- protected[this]
- Definition Classes
- IterableLike → TraversableLike
-
def
toIndexedSeq: IndexedSeq[List[Item]]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toIterable: Iterable[List[Item]]
- Definition Classes
- IterableLike → TraversableOnce → GenTraversableOnce
-
def
toIterator: Iterator[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableOnce
- Annotations
- @deprecatedOverriding( ... , "2.11.0" )
-
def
toList: List[List[Item]]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toMap[T, U](implicit ev: <:<[List[Item], (T, U)]): Map[T, U]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toParArray: ParArray[T]
- Implicit
- This member is added by an implicit conversion from Parts[Item] to CollectionsHaveToParArray[Parts[Item], T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type (Parts[Item]) ⇒ GenTraversableOnce[T] is in scope.
- Definition Classes
- CollectionsHaveToParArray
-
def
toSeq: Seq[List[Item]]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toSet[B >: List[Item]]: Set[B]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
toStream: Stream[List[Item]]
- Definition Classes
- IterableLike → TraversableLike → GenTraversableOnce
-
def
toString(): String
- Definition Classes
- TraversableLike → Any
-
def
toTraversable: Traversable[List[Item]]
- Definition Classes
- TraversableLike → TraversableOnce → GenTraversableOnce
- Annotations
- @deprecatedOverriding( ... , "2.11.0" )
-
def
toVector: Vector[List[Item]]
- Definition Classes
- TraversableOnce → GenTraversableOnce
-
def
transpose[B](implicit asTraversable: (List[Item]) ⇒ GenTraversableOnce[B]): Iterable[Iterable[B]]
- Definition Classes
- GenericTraversableTemplate
- Annotations
- @migration
- Migration
(Changed in version 2.9.0)
transpose
throws anIllegalArgumentException
if collections are not uniformly sized.
-
def
unzip[A1, A2](implicit asPair: (List[Item]) ⇒ (A1, A2)): (Iterable[A1], Iterable[A2])
- Definition Classes
- GenericTraversableTemplate
-
def
unzip3[A1, A2, A3](implicit asTriple: (List[Item]) ⇒ (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])
- Definition Classes
- GenericTraversableTemplate
-
def
view(from: Int, until: Int): IterableView[List[Item], Iterable[List[Item]]]
- Definition Classes
- IterableLike → TraversableLike
-
def
view: IterableView[List[Item], Iterable[List[Item]]]
- Definition Classes
- IterableLike → TraversableLike
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withFilter(p: (List[Item]) ⇒ Boolean): FilterMonadic[List[Item], Iterable[List[Item]]]
- Definition Classes
- TraversableLike → FilterMonadic
-
def
zip[A1 >: List[Item], B, That](that: GenIterable[B])(implicit bf: CanBuildFrom[Iterable[List[Item]], (A1, B), That]): That
- Definition Classes
- IterableLike → GenIterableLike
-
def
zipAll[B, A1 >: List[Item], That](that: GenIterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Iterable[List[Item]], (A1, B), That]): That
- Definition Classes
- IterableLike → GenIterableLike
-
def
zipWithIndex[A1 >: List[Item], That](implicit bf: CanBuildFrom[Iterable[List[Item]], (A1, Int), That]): That
- Definition Classes
- IterableLike → GenIterableLike
- def →[B](y: B): (Parts[Item], B)
Shadowed Implicit Value Members
-
def
filter(p: (List[Item]) ⇒ Boolean): TraversableOnce[List[Item]]
- Implicit
- This member is added by an implicit conversion from Parts[Item] to MonadOps[List[Item]] performed by method MonadOps in scala.collection.TraversableOnce.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(parts: MonadOps[List[Item]]).filter(p)
- Definition Classes
- MonadOps
-
def
flatMap[B](f: (List[Item]) ⇒ GenTraversableOnce[B]): TraversableOnce[B]
- Implicit
- This member is added by an implicit conversion from Parts[Item] to MonadOps[List[Item]] performed by method MonadOps in scala.collection.TraversableOnce.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(parts: MonadOps[List[Item]]).flatMap(f)
- Definition Classes
- MonadOps
-
def
flatten: Iterator[Item]
- Implicit
- This member is added by an implicit conversion from Parts[Item] to FlattenOps[Item] performed by method flattenTraversableOnce in scala.collection.TraversableOnce. This conversion will take place only if an implicit value of type (List[Item]) ⇒ TraversableOnce[Item] is in scope.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(parts: FlattenOps[Item]).flatten
- Definition Classes
- FlattenOps
-
def
map[B](f: (List[Item]) ⇒ B): TraversableOnce[B]
- Implicit
- This member is added by an implicit conversion from Parts[Item] to MonadOps[List[Item]] performed by method MonadOps in scala.collection.TraversableOnce.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(parts: MonadOps[List[Item]]).map(f)
- Definition Classes
- MonadOps
-
def
withFilter(p: (List[Item]) ⇒ Boolean): Iterator[List[Item]]
- Implicit
- This member is added by an implicit conversion from Parts[Item] to MonadOps[List[Item]] performed by method MonadOps in scala.collection.TraversableOnce.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(parts: MonadOps[List[Item]]).withFilter(p)
- Definition Classes
- MonadOps