Iterablex

org.specs2.collection.Iterablex
See theIterablex companion trait
object Iterablex extends Iterablex

Attributes

Companion
trait
Graph
Supertypes
trait Iterablex
class Object
trait Matchable
class Any
Self type
Iterablex.type

Members list

Extensions

Inherited extensions

extension [T, S >: T](xs: Iterable[T])
def isSimilar(that: Iterable[S], f: (T, S) => Boolean): Boolean

Attributes

Returns

true if the 2 iterables contain the same elements, in the same order, according to a function f

Inherited from:
Iterablex
extension [T](xs: Iterable[T])
def containsInOrder(l: T*): Boolean

Attributes

Returns

true if the second iterable elements are contained in the first, in order

Inherited from:
Iterablex
def mapFirst(f: T => T): Seq[T]

map the first element with a function

map the first element with a function

Attributes

Inherited from:
Iterablex
def mapLast(f: T => T): Seq[T]

map the last element with a function

map the last element with a function

Attributes

Inherited from:
Iterablex
def rotate(n: Int): Iterable[T]

Attributes

Returns

a sequence rotated of a number of elements

Inherited from:
Iterablex
def sameElementsAs(that: Iterable[T], f: (T, T) => Boolean): Boolean

This recursive function is not really well-formed (the asInstanceOf should be ample proof). It only works if T <===> Seq[T]

This recursive function is not really well-formed (the asInstanceOf should be ample proof). It only works if T <===> Seq[T]

This is the case for NodeFunctions.isEqualIgnoringSpace where it is used to check if 2 xml NodeSeqs have the same nodes regardless of whitespace

Attributes

Returns

true if the 2 iterables contain the same elements (according to a comparison function f) recursively, in any order

Inherited from:
Iterablex
def sameElementsAs(that: Iterable[T]): Boolean

Attributes

Returns

true if the 2 iterables contain the same elements recursively, in any order

Inherited from:
Iterablex
def scramble(random: Random): Seq[T]

Attributes

Returns

a randomly mixed sequence

Inherited from:
Iterablex
def scramble: Seq[T]

Attributes

Returns

a randomly mixed sequence

Inherited from:
Iterablex
def toDeepString: String

Attributes

Returns

the representation of the elements of the iterable using the toString method recursively

Inherited from:
Iterablex