public final class Problem extends NamedObject
Problem
instance belong
to a ContestInfo
object, and consists in the problem
metadata such a name, description, and IO details.Modifier and Type | Class and Description |
---|---|
static class |
Problem.Deserializer
Custom deserializer that normalizes problem body content.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
body
Full HTML text that describes this problem.
|
private java.lang.String |
id
Problem unique identifier.
|
private ProblemInput[] |
inputs
List of inputs that are available for solving in this problem.
|
private java.lang.String |
key
TODO : Figure out what is key for.
|
private java.lang.String |
normalizedName
Normalized name generated by
Template.normalize(String) method. |
private ContestInfo |
parent
Parent contest of this problem.
|
private static long |
serialVersionUID
Serialization index.
|
private java.lang.String |
type
TODO : Figure out what is type for.
|
Constructor and Description |
---|
Problem() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Getter for the problem body description.
|
java.lang.String |
getId()
Getter for the problem id.
|
java.lang.String |
getKey()
Getter for the problem key.
|
java.lang.String |
getNormalizedName()
Getter for the problem normalized name.
|
ContestInfo |
getParent()
Getter for the parent contest of this problem.
|
java.util.List<ProblemInput> |
getProblemInputs()
Getter for the problem inputs.
|
java.lang.String |
getType()
Getter for the problem type.
|
private static java.lang.String |
normalize(java.lang.String body)
Normalizes the given HTML body text, by replacing
images URI by absolute URI using preference hostname.
|
protected void |
setParent(ContestInfo parent)
Contest setter that aims to be called by
ContestInfo static factory. |
getName, getName
private static final long serialVersionUID
private java.lang.String body
private java.lang.String id
private java.lang.String key
private java.lang.String type
private ProblemInput[] inputs
private transient ContestInfo parent
private java.lang.String normalizedName
Template.normalize(String)
method.private static java.lang.String normalize(java.lang.String body)
body
- HTML body to normalize.protected void setParent(ContestInfo parent)
ContestInfo
static factory.parent
- Parent contest of this problem.public ContestInfo getParent()
parent
public java.lang.String getNormalizedName()
Template.normalize(String)
method.normalizedName
public java.lang.String getBody()
body
public java.lang.String getId()
id
public java.lang.String getKey()
key
public java.lang.String getType()
type
public java.util.List<ProblemInput> getProblemInputs()
inputs