CardSetInventory class final
A collection of cards that belongs to a specific CardSet.
This class is intended to be used to represent all of the cards that belong to a specific CardSet, e.g. sparkOfRebellion. This is to split the definition of CardSet from the cards themselves.
For a data structure to represent a collection of cards that may span multiple CardSets, see Collection, or for a specific deck, Deck.
Equality
Two CardSetInventorys are equal if they reference the same cardSet; the specific cards in the collection are not considered. For a deep comparison, see Collection.fromCardSets.
- Annotations
-
- @immutable
Constructors
-
CardSetInventory(CardSet cardSet, Set<
Card> cards) -
Creates a new CardSetInventory for the given
cardSet
withcards
.factory
Properties
Methods
-
find(
int orderInSet) → Card -
Looks up a card in this collection by its
orderInSet
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryFind(
int orderInSet) → Card? -
Looks up a card in this collection by its
orderInSet
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override