summaryrefslogblamecommitdiff
path: root/src/library/scalax/collection/generic/covartest/SequenceFactory.scala
blob: 1fb85d02db0ce42cf070c705a6ffee97635938e0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                                   
package scalax.collection.generic.covartest

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 unapplySequence[A](x: CC[A]): Some[CC[A]] = Some(x)
}