public class OrdinalTimeDomainDivider extends java.lang.Object implements DomainDivider
MAX_BOUNDARIES
Modifier | Constructor and Description |
---|---|
protected |
OrdinalTimeDomainDivider() |
Modifier and Type | Method and Description |
---|---|
DatumVector |
boundaries(Datum min,
Datum max)
Returns the boundaries between intervals on the given data range.
|
long |
boundaryCount(Datum min,
Datum max)
Compute the number of intervals produced by this
DomainDivider
on the given range. |
DomainDivider |
coarserDivider(boolean superset)
Return a new divider with larger intervals.
|
DomainDivider |
finerDivider(boolean superset)
Return a new divider with smaller intervals.
|
DatumFormatter |
getFormatter(DatumRange range) |
static void |
main(java.lang.String[] args) |
DatumRange |
rangeContaining(Datum v)
Return a
DatumRange representing the interval containing
the given value. |
java.lang.String |
toString() |
public DomainDivider finerDivider(boolean superset)
DomainDivider
superset
parameter is true, the interval boundaries of the existing divider are
guaranteed to align with (some) intervals of the new one. In other
words, the new divider will subdivide the existing one.finerDivider
in interface DomainDivider
superset
- true to force boundary alignment with the calling DomainDivider
For a given range, the boundaries will be aligned.public DomainDivider coarserDivider(boolean superset)
DomainDivider
superset
parameter is true, the interval boundaries of the new divider are
guaranteed to align with (some) interval boundaries of the existing one.
In other words, the existing divider will subdivide the new one.coarserDivider
in interface DomainDivider
superset
- true to force boundary alignment with the calling DomainDivider
.
For a given range, the boundaries will be aligned.public DatumVector boundaries(Datum min, Datum max)
DomainDivider
boundaries
in interface DomainDivider
min
- the lower boundmax
- the upper boundDatumVector
containing the boundary valuespublic long boundaryCount(Datum min, Datum max)
DomainDivider
DomainDivider
on the given range. This allows the DomainDivider to indicate the number
of intervals (e.g. a zillion) without having to enumerate them. When
min or max lay on a boundary, it should be counted (inclusive max). If
min>&eq;max, then zero should be returned.boundaryCount
in interface DomainDivider
public DatumRange rangeContaining(Datum v)
DomainDivider
DatumRange
representing the interval containing
the given value.rangeContaining
in interface DomainDivider
public java.lang.String toString()
toString
in class java.lang.Object
public DatumFormatter getFormatter(DatumRange range)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception