public final class RulerProblem extends java.lang.Object implements ProblemDefinition
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIRECT_REPRESENTATION_FORMAT |
static java.lang.String |
INDIRECT_REPRESENTATION_FORMAT |
private int |
marksCount |
private int |
maxAllowedDistance |
Constructor and Description |
---|
RulerProblem(int marksCount,
int maxAllowedDistance)
Instantiates a new OGR problem.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
int |
marksCount() |
int |
maxAllowedDistance() |
java.lang.String |
representation() |
public static final java.lang.String DIRECT_REPRESENTATION_FORMAT
public static final java.lang.String INDIRECT_REPRESENTATION_FORMAT
private final int marksCount
private final int maxAllowedDistance
public RulerProblem(int marksCount, int maxAllowedDistance)
Instantiates a new OGR problem.
marksCount
- the order of a ruler (number of marks on it)maxAllowedDistance
- the maximum allowed distance on a rulerpublic int marksCount()
public int maxAllowedDistance()
public java.lang.String representation()
representation
in interface ProblemDefinition
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object