public abstract class AbstractGraduations extends java.lang.Object implements Graduations
Modifier and Type | Field and Description |
---|---|
protected static double |
PRECISION |
protected java.util.List<java.lang.Double> |
subValues |
Constructor and Description |
---|
AbstractGraduations(double lowerBound,
boolean lowerBoundIncluded,
double upperBound,
boolean upperBoundIncluded)
Root constructor.
|
AbstractGraduations(double lowerBound,
double upperBound)
Root constructor.
|
AbstractGraduations(Graduations parentGraduations)
Constructor from parent graduations.
|
AbstractGraduations(Graduations parentGraduations,
double lowerBound,
boolean lowerBoundIncluded,
double upperBound,
boolean upperBoundIncluded)
Child constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contain(double value)
Return true if the interval contain the given value.
|
boolean |
containRelative(double value)
Equivalent to contain but for interval [0, upper-lower] (to avoid rounding error in computations)
|
java.text.DecimalFormat |
getFormat()
Return an adapted number format.
|
double |
getLowerBound()
Return the lower bound.
|
Graduations |
getParentGraduations()
Return the parent graduation.
|
java.util.List<java.lang.Double> |
getSubGraduations(int N)
Get the list of subgraduations corresponding to N subticks between two main consecutives ticks
|
double |
getUpperBound()
Return the upper bound.
|
boolean |
isLowerBoundIncluded()
Return true if the lower bound is included.
|
boolean |
isUpperBoundIncluded()
Return true if the lower bound is included.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllValues, getAlternative, getMore, getNewValues, getSubDensity, getSubGraduations
protected static final double PRECISION
protected java.util.List<java.lang.Double> subValues
public AbstractGraduations(Graduations parentGraduations)
Graduations
and set it as is parent.parentGraduations
- the parent graduations to copy.public AbstractGraduations(double lowerBound, boolean lowerBoundIncluded, double upperBound, boolean upperBoundIncluded)
lowerBound
- the actual lower bounds.lowerBoundIncluded
- the actual lower bounds included status.upperBound
- the actual upper bounds.upperBoundIncluded
- the actual upper bounds included status.public AbstractGraduations(double lowerBound, double upperBound)
lowerBound
- the actual lower bounds included status.upperBound
- the actual upper bounds included status.public AbstractGraduations(Graduations parentGraduations, double lowerBound, boolean lowerBoundIncluded, double upperBound, boolean upperBoundIncluded)
parentGraduations
- the parent graduation.lowerBound
- the actual lower bounds.lowerBoundIncluded
- the actual lower bounds included status.upperBound
- the actual upper bounds.upperBoundIncluded
- the actual upper bounds included status.public final double getLowerBound()
Graduations
getLowerBound
in interface Graduations
public final boolean isLowerBoundIncluded()
Graduations
isLowerBoundIncluded
in interface Graduations
public final double getUpperBound()
Graduations
getUpperBound
in interface Graduations
public final boolean isUpperBoundIncluded()
Graduations
isUpperBoundIncluded
in interface Graduations
public final Graduations getParentGraduations()
Graduations
getParentGraduations
in interface Graduations
public final boolean contain(double value)
Graduations
contain
in interface Graduations
value
- the given value.public final boolean containRelative(double value)
public final java.text.DecimalFormat getFormat()
Graduations
getFormat
in interface Graduations
public java.util.List<java.lang.Double> getSubGraduations(int N)
Graduations
getSubGraduations
in interface Graduations
N
- the number of graduationspublic java.lang.String toString()
toString
in class java.lang.Object