public final class Contest extends NamedObject
Contest
.
A Contest
is represented by a name and a
collection of Round
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEST_CLASS_NAME
Class name of the element that contains contest data.
|
static java.lang.String |
CONTEST_INDEX
URL of the contest index page.
|
private java.util.List<Round> |
rounds
Round that belongs to this contest. |
private static long |
serialVersionUID
Serialization index.
|
Modifier | Constructor and Description |
---|---|
private |
Contest(java.lang.String name,
java.util.List<Round> rounds)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<Contest> |
get()
Static factory method that retrieves all contest available
on Google Jam index page.
|
private static java.util.Optional<java.lang.String> |
getName(org.jsoup.nodes.Element element)
Static factory method that retrieves contest name
from a given HTML contest element.
|
java.util.List<Round> |
getRounds()
Getter that returns a immutable view
of the
Round list. |
getName, getName
private static final long serialVersionUID
public static final java.lang.String CONTEST_INDEX
public static final java.lang.String CONTEST_CLASS_NAME
public java.util.List<Round> getRounds()
Round
list.Collections.unmodifiableList(List)
private static java.util.Optional<java.lang.String> getName(org.jsoup.nodes.Element element)
element
- JSoup element to retrieve title from.public static java.util.List<Contest> get() throws java.lang.Exception
java.lang.Exception
- If any error occurs while retrieving or parsing document.