OrphanHand class cards

Hand of cards not associated with a Deck.

Inheritance
Implemented types
Available Extensions

Constructors

OrphanHand()
OrphanHand.fromIterable(Iterable<Card> c)
Create new stack from list of cards, e.g.:
OrphanHand.fromText(String text)

Properties

first Card
The first element.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Is list empty?
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setteroverride
iterator Iterator<Card>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last Card
The last element.
no setterinherited
length int
How many cards currently in the stack?
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single Card
Checks that this iterable has only one element, and returns that element.
no setterinherited

Methods

any(bool test(Card element)) bool
Checks whether any element of this iterable satisfies test.
inherited
cardAt(int index) Card?
Return the card at position index.
override
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
inherited
clear() → void
Empty the stack.
override
clone() OrphanHand
override
combinations([int? count]) Iterable<OrphanHand>
override
contains(Object? element) bool
Whether the collection contains an element equal to element.
override
elementAt(int index) Card
Returns the indexth element.
inherited
equals(HandInterface other) bool
override
every(bool test(Card element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> toElements(Card element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(Card element), {Card orElse()?}) Card
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, Card element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<Card> other) Iterable<Card>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(Card element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
highAceFix() → void
Fix cards for decks with high aces.
insertAt(int index, Card card) → void
Insert card at position index.
override
isEquivalentTo(HandInterface other) bool
override
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(Card element), {Card orElse()?}) Card
The last element that satisfies the given predicate test.
inherited
lowAceFix() → void
Fix cards for decks with low aces.
map<T>(T toElement(Card e)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop() Card?
override
popN(int n) Iterable<Card>
override
push(Card card) → void
override
pushN(int count, Iterable<Card> cards) → void
Add n cards to the top of the stack as a unit.
override
reduce(Card combine(Card value, Card element)) Card
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
removeAt(int index) Card?
Remove card at position index.
override
removeCard(Card card) bool
Remove top-most specific card from list.
override
setCardAt(int index, Card card) bool
override
shuffle() → void
Randomize order of cards in the stack.
override
singleWhere(bool test(Card element), {Card orElse()?}) Card
The single element that satisfies test.
inherited
skip(int count) Iterable<Card>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(Card value)) Iterable<Card>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
sort() → void
Sort cards in the stack in descending order from the top.
override
take(int count) Iterable<Card>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(Card value)) Iterable<Card>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) List<Card>
Creates a List containing the elements of this Iterable.
inherited
toSet() Set<Card>
Creates a Set containing the same elements as this iterable.
inherited
toString() String
Returns a string representation of (some of) the elements of this.
override
where(bool test(Card element)) Iterable<Card>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → dynamic
override
operator []=(int index, Card card) → void
override