27.07.2013 Views

2 Why We Need Model-Based Testing

2 Why We Need Model-Based Testing

2 Why We Need Model-Based Testing

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

302 <strong>Model</strong>ing Library Reference<br />

Count<br />

Returns the number of elements in the value array.<br />

IsEmpty<br />

Returns true if the value array has no elements. Returns false otherwise.<br />

Item(int)<br />

Length<br />

etc. . . .<br />

A.2.6 Bag<br />

Bag<br />

An unordered collection of possibly repeating elements. This is also known as a<br />

multiset. The type is immutable; add/remove methods return a new bag.<br />

Syntax<br />

public sealed class Bag : CollectionValue<br />

Constructors<br />

Bag()<br />

Constructs an empty bag. The static field Bag.EmptyBag is preferred instead<br />

of using this form of the constructor.<br />

Bag(IEnumerable)<br />

Constructs a bag with elements taken from a collection. The Count of the resulting<br />

bag will be the same as the number of values in the collection given as the<br />

argument.<br />

Bag(T[])<br />

Constructs a bag with elements given as params arguments. The Count of the<br />

bag will be the same as the number of arguments to the constructor.<br />

Bag(IEnumerable)<br />

Constructs a bag with elements and their corresponding multiplicities given as<br />

a pair enumeration.<br />

Bag(Pair[])<br />

Constructs a bag with params arguments that are pairs of elements and their<br />

corresponding multiplicities.<br />

Methods<br />

The following entries describe some of the methods of this type. Many more are<br />

described in the library documentation.<br />

more free ebooks download links at:<br />

http://www.ebook-x.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!