An IndexedSeq[Snapshot]
providing toString
and lines
methods that
can be useful for debug and log messages about program state.
See the main documentation for trait Snapshots
for more information and examples.
- Companion:
- object
- Source:
- Snapshots.scala
Value members
Concrete methods
Appends a string element to this sequence, if it doesn't already exist in the sequence.
Appends a string element to this sequence, if it doesn't already exist in the sequence.
If the string element already exists in this sequence, this method returns itself. If not,
this method returns a new MultiSelOptionSeq
with the passed value appended to the
end of the original MultiSelOptionSeq
.
- Value parameters:
- the
string element to append to this sequence
- Returns:
a
MultiSelOptionSeq
that contains the passed string value- Source:
- Snapshots.scala
Removes a string element to this sequence, if it already exists in the sequence.
Removes a string element to this sequence, if it already exists in the sequence.
If the string element does not already exist in this sequence, this method returns itself. If the element
is contained in this sequence, this method returns a new MultiSelOptionSeq
with the passed value
removed from the the original MultiSelOptionSeq
, leaving any other elements in the same order.
- Value parameters:
- the
string element to append to this sequence
- Returns:
a
MultiSelOptionSeq
that contains the passed string value- Source:
- Snapshots.scala
Selects an element by its index in the sequence.
Selects an element by its index in the sequence.
This method invokes apply
on the underlying immutable IndexedSeq[String]
, passing in idx
, and returns the result.
- Value parameters:
- idx
the index to select
- Returns:
the element of this sequence at index
idx
, where 0 indicates the first element- Source:
- Snapshots.scala
The length of this sequence.
The length of this sequence.
This method invokes length
on the underlying immutable IndexedSeq[String]
and returns the result.
- Returns:
the number of elements in this sequence
- Source:
- Snapshots.scala
An alternate way to present the result of the snap
method of trait Snapshots that
puts each variable or expression on its own line.
An alternate way to present the result of the snap
method of trait Snapshots that
puts each variable or expression on its own line.
Here's an example:
scala> snap(a, b, c, d, e, f).lines res4: String = a was 1 b was 2 c was 3 d was 4 e was null f was null
- Source:
- Snapshots.scala
The default way to present the result of the snap
method of trait Snapshots.
The default way to present the result of the snap
method of trait Snapshots.
Here's an example:
scala> snap(a, b, c, d, e, f) res3: org.scalactic.SnapshotSeq = a was 1, b was 2, c was 3, d was 4, e was null, f was null
- Definition Classes
- Seq -> Function1 -> Iterable -> Any
- Source:
- Snapshots.scala
Inherited methods
- Inherited from:
- IterableOnceOps
- Inherited from:
- IterableOnceOps
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Definition Classes
- IndexedSeq -> IndexedSeq -> Seq -> Seq -> Iterable -> Iterable -> IterableOps
- Inherited from:
- IndexedSeq
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Inherited from:
- IterableOnceOps
- Inherited from:
- IndexedSeq
- Inherited from:
- IndexedSeqOps
- Definition Classes
- IndexedSeqOps -> IndexedSeqOps -> IterableOps -> IterableOnceOps
- Inherited from:
- IndexedSeqOps
Deprecated and Inherited methods
- Deprecated
[Since version 2.13.0]
Use foldLeft instead of /:- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use foldRight instead of :\\- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use iterableFactory instead- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use `dest ++= coll` instead- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use segmentLength instead of prefixLength- Inherited from:
- SeqOps
- Deprecated
[Since version 2.13.0]
Use coll instead of repr in a collection implementation, use the collection value itself from the outside- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)- Inherited from:
- SeqOps
- Deprecated
[Since version 2.13.0]
Iterable.seq always returns the iterable itself- Inherited from:
- Iterable
- Deprecated
[Since version 2.13.7]
toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections- Inherited from:
- Iterable
- Deprecated
[Since version 2.13.0]
Use .iterator instead of .toIterator- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use `concat` instead- Inherited from:
- SeqOps