package cz.muni.fi.bronchus.questions; import java.util.*; /** * Represents container for items with atributes: topic of this Section, * type, duration and the count of random items to be choosed. * @author Tomáš Udržal */ public class Section extends Repository { /** * Duration of this Section */ private String duration; /** * Type of this Section. 0 for sequentional order of items, other value for random order */ private int type; /** * Count of random items to be choosed */ private int countOfRandomItems; /** * Topic of the Section */ private String topic; /** Creates a new instance of Section */ public Section() { duration=""; countOfRandomItems=-1; } /** * Creates a new instance of Section with defined type * @param type type of Section */ public Section(int type) { this.type=type; this.duration=""; this.countOfRandomItems=-1; } /** * Setter method for the type of this Section * @param i type to be set */ public void setType(int i) { type=i; } /** * Getter method for the type of Section * @return type of Section */ public int getType() { return type; } /** * Setter method for the count of the random items of this Section * @param i count of the items to be set */ public void setCountOfRandomItems(int i) { countOfRandomItems=i; } /** * Getter method for the count of the items of this Section * @return count of random items */ public int getCountOfRandomItems() { return countOfRandomItems; } /** * Setter method for the topic of this Section * @param x topic to be set */ public void setTopic(String x) { topic=x; } /** * Getter method for the topic of this Section * @return topic of Section */ public String getTopic() { return topic; } /** * Setter method for the duration of this Section * @param x duration to be set */ public void setDuration(String x) { duration=x; } /** * Getter method for the duration of this Section * @return duration of Section */ public String getDuration() { return duration; } }