summaryrefslogtreecommitdiff
path: root/src/library/scalax/collection/generic/SequenceFactory.scala
blob: 26818c49c941b0a375ccbe29cc4992a1c364419d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
package scalax.collection.generic

trait SequenceFactory[CC[A] <: Sequence[A]] extends IterableFactory[CC] {

  /** This method is called in a pattern match { case Sequence(...) => }.
   *
   *  @param x the selector value
   *  @return  sequence wrapped in an option, if this is a Sequence, otherwise none
   */
  def unapplySeq[A](x: CC[A]): Some[CC[A]] = Some(x)
}