public final class ContestInfo
extends java.lang.Object
implements java.io.Serializable, java.io.ObjectInputValidation
Modifier and Type | Field and Description |
---|---|
private int |
analysis
Boolean flag that indicates if this contest have analysis available.
|
private static java.lang.String |
CONTEST_PROJECT_PREFIX
Prefix used for contest project.
|
private Problem[] |
problems
List of problem this contest is exposing.
|
private java.lang.String |
projectName
Name of the project associated to this contest.
|
private static java.lang.String |
REQUEST
Path of the ContestInfo request.
|
private static long |
serialVersionUID
Serialization index.
|
private int |
version
Integer that defines the problems version.
|
Constructor and Description |
---|
ContestInfo() |
Modifier and Type | Method and Description |
---|---|
private void |
createProjectName(Round round)
Sets the internal parent round.
|
static ContestInfo |
get(Round round)
Static factory method that builds a
ContestInfo instance
from the given round using a /ContestInfo
request from the round dashboard. |
java.util.List<Problem> |
getProblems()
Returns
IProblem instance associated
to this contest. |
java.lang.String |
getProjectName()
Getter for the project name associated to this contest.
|
int |
getVersion()
Getter for the problems version.
|
boolean |
hasAnalysis()
Indicates if this contests already have
analysis committed or not.
|
private void |
readObject(java.io.ObjectInputStream stream)
Custom readObject method that registers this object as a deserialization validator.
|
void |
validateObject() |
private static final long serialVersionUID
private static final java.lang.String CONTEST_PROJECT_PREFIX
private int analysis
private int version
private Problem[] problems
private java.lang.String projectName
private static final java.lang.String REQUEST
private void createProjectName(Round round)
get(Round)
.round
- public java.lang.String getProjectName()
public boolean hasAnalysis()
public int getVersion()
public java.util.List<Problem> getProblems()
IProblem
instance associated
to this contest.public void validateObject() throws java.io.InvalidObjectException
validateObject
in interface java.io.ObjectInputValidation
java.io.InvalidObjectException
private void readObject(java.io.ObjectInputStream stream) throws java.io.OptionalDataException, java.lang.ClassNotFoundException, java.io.IOException
stream
- ObjectInputStream
to register this validator to.java.io.OptionalDataException
java.lang.ClassNotFoundException
java.io.IOException
public static ContestInfo get(Round round) throws java.io.IOException
ContestInfo
instance
from the given round using a /ContestInfo
request from the round dashboard.round
- Round to retrieve ContestInfo
from.ContestInfo
instance.java.io.IOException
- If any error occurs while performing the request.