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(Set<Card> cards, {CardSet? belongsTo})
Creates a new CardSetInventory for the given cards in belongsTo.
factory

Properties

cards Set<Card>
The cards in this collection.
final
cardSet CardSet
The card set that every card in cards belongs to.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

find<T extends Card>(int orderInSet, [String? debugAssertName]) → T
Looks up a card in this collection by its orderInSet.
findToken(int orderInSet, [String? debugAssertName]) TokenCard
Looks up a token 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<T extends Card>(int orderInSet, [String? debugAssertName]) → T?
Looks up a card in this collection by its orderInSet.
tryFindToken(int orderInSet, [String? debugAssertName]) TokenCard?
Looks up a token in this collection by its orderInSet.

Operators

operator ==(Object other) bool
The equality operator.
override