public interface

CardList

com.usebutton.sdk.purchasepath.CardList

Summary

Public Methods
abstract void addCard(Card card)
Appends a card to the end of the current list of cards in the card system.
abstract Card getCard(Object key)
Returns the card in the current card system that matches the given key.
abstract List<Card> getCards()
The list of cards currently added to the card system, in the order they can be displayed to the user.
abstract void insertCard(Card card, int index)
Inserts a card into the current list of cards in the card system at a specific index.
abstract void removeAllCards()
Removes all cards in the current card system.
abstract void removeCard(Object key)
Removes the card in the current card system that matches the given key.
abstract void replaceCard(Card card, Object key)
Replaces the card in the current card system that matches the given key with a new card.
abstract void setCards(List<Card> cards)
Sets the cards to be maintained by the card list.

Public Methods

public abstract void addCard (Card card)

Appends a card to the end of the current list of cards in the card system.

Parameters
card The card to be added.

public abstract Card getCard (Object key)

Returns the card in the current card system that matches the given key. Keys are meant to be unique. If multiple cards match the given key, the first in the list that matches will be returned.

Parameters
key The key of the card to be returned.
Returns
  • The card in the current card system that matches the given key.

public abstract List<Card> getCards ()

The list of cards currently added to the card system, in the order they can be displayed to the user.

Returns
  • An array of cards currently added to the card list.

public abstract void insertCard (Card card, int index)

Inserts a card into the current list of cards in the card system at a specific index.

Parameters
card The card to be added.
index The location in the current list of cards to insert the card.

public abstract void removeAllCards ()

Removes all cards in the current card system.

public abstract void removeCard (Object key)

Removes the card in the current card system that matches the given key. Keys are meant to be unique. If multiple cards match the given key, the first in the list that matches will be removed.

Parameters
key The key of the card to be removed.

public abstract void replaceCard (Card card, Object key)

Replaces the card in the current card system that matches the given key with a new card. Keys are meant to be unique. If multiple cards match the given key, the first in the list that matches will be replaced. If no cards match, no replacement will occur.

Parameters
key The key of the card to be replaced.

public abstract void setCards (List<Card> cards)

Sets the cards to be maintained by the card list.

Parameters
cards The array of cards.