|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.datum.DatumRangeUtil
public class DatumRangeUtil
Nested Class Summary | |
---|---|
static class |
DatumRangeUtil.DateDescriptor
|
Constructor Summary | |
---|---|
DatumRangeUtil()
|
Method Summary | |
---|---|
static java.lang.String |
formatTimeRange(DatumRange self)
|
static java.util.List |
generateList(DatumRange bounds,
DatumRange element)
return a list of DatumRanges that together cover the space identified by bounds. |
static DatumRange |
newDimensionless(double lower,
double upper)
|
static double |
normalize(DatumRange dr,
Datum d)
returns the position within dr, where 0. |
static double |
normalizeLog(DatumRange dr,
Datum d)
returns the position within dr, where 0. |
static DatumRange |
parseDatumRange(java.lang.String str,
DatumRange orig)
|
static DatumRange |
parseDatumRange(java.lang.String str,
Units units)
|
static DatumRange |
parseTimeRange(java.lang.String string)
|
static DatumRange |
parseTimeRangeValid(java.lang.String s)
|
static DatumRange |
rescale(DatumRange dr,
double min,
double max)
returns DatumRange relative to this, where 0. |
static DatumRange |
rescaleLog(DatumRange dr,
double min,
double max)
returns DatumRange relative to this, where 0. |
static boolean |
sloppyContains(DatumRange context,
Datum datum)
Like DatumRange.contains, but includes the end point. |
static DatumRange |
sloppyIntersection(DatumRange range,
DatumRange include)
Like DatumRange.intesects, but returns a zero-width range when the two do not intersect. |
static DatumRange |
union(DatumRange range,
DatumRange include)
return the union of two DatumRanges. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatumRangeUtil()
Method Detail |
---|
public static DatumRange parseTimeRange(java.lang.String string) throws java.text.ParseException
java.text.ParseException
public static DatumRange parseTimeRangeValid(java.lang.String s)
public static java.lang.String formatTimeRange(DatumRange self)
public static java.util.List generateList(DatumRange bounds, DatumRange element)
DatumRange bounds= DatumRangeUtil.parseTimeRangeValid( '2006' ); DatumRange first= DatumRangeUtil.parseTimeRangeValid( 'Jan 2006' ); List list= generateList( bounds, first );Note the procedure calls element.previous until bound.min() is contained, then calls bound.max until bound.max() is contained.
bounds
- range to be covered.element
- range defining the width and phase of each list DatumRange.public static DatumRange newDimensionless(double lower, double upper)
public static DatumRange parseDatumRange(java.lang.String str, Units units) throws java.text.ParseException
java.text.ParseException
public static DatumRange parseDatumRange(java.lang.String str, DatumRange orig) throws java.text.ParseException
java.text.ParseException
public static DatumRange rescale(DatumRange dr, double min, double max)
dr
- a DatumRange with nonzero width.min
- the new min normalized with respect to this range. 0. is this range's min, 1 is this range's max, 0 is
min-width.max
- the new max with normalized wrt this range. 0. is this range's min, 1 is this range's max, 0 is
min-width.
public static DatumRange rescaleLog(DatumRange dr, double min, double max)
dr
- a DatumRange with nonzero width.min
- the new min normalized with respect to this range. 0. is this range's min, 1 is this range's max, 0 is
min-width.max
- the new max with normalized wrt this range. 0. is this range's min, 1 is this range's max, 0 is
min-width.
public static double normalize(DatumRange dr, Datum d)
dr
- a datum range with non-zero width.d
- a datum to normalize with respect to the range.
public static double normalizeLog(DatumRange dr, Datum d)
dr
- a datum range with non-zero width.d
- a datum to normalize with respect to the range.
public static DatumRange sloppyIntersection(DatumRange range, DatumRange include)
DatumRange.intersection.
public static boolean sloppyContains(DatumRange context, Datum datum)
DatumRange.contains.
public static DatumRange union(DatumRange range, DatumRange include)
range
- include
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |