aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/equalparts/cardbase/data/FullCardSet.java
blob: d469829298a387a9cbcb176b370d47b6b4a11dee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package eu.equalparts.cardbase.data;

import java.util.List;

public class FullCardSet {
	
	private String name;
	private String code;
	private String releaseDate;
	private String border;
	private String type;
	private String block;
	private String gathererCode;
	private List<Card> cards;

	/**
	 * @return the set's name.
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the set code.
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return the set's release date.
	 */
	public String getReleaseDate() {
		return releaseDate;
	}
	
	/**
	 * @return the set's border type.
	 */
	public String getBorder() {
		return border;
	}

	/**
	 * @return the type of the set.
	 */
	public String getType() {
		return type;
	}

	/**
	 * @return the set's block.
	 */
	public String getBlock() {
		return block;
	}

	/**
	 * @return the set's Gatherer code.
	 */
	public String getGathererCode() {
		return gathererCode;
	}

	/**
	 * @return a full list of the set's cards.
	 */
	public List<Card> getCards() {
		return cards;
	}

	/**
	 * Searches for a card by number (the one shown on the card itself).
	 * 
	 * @param number the number of the card to search.
	 * @return the requested {@code Card}, or null if no card is found with that number.
	 */
	public Card getCardByNumber(String number) {
		for (Card card : cards) {
			if (card.number.equals(number)) 
				return card;
		}
		return null;
	}
}