org.das2.datum.format.DatumFormatter

Formats Datum objects for printing and parses strings to Datum objects.


axisFormat

axisFormat( org.das2.datum.DatumVector datums, DatumRange context ) → String[]

format the set of Datums using a consistent and optimized format. First introduced to support DasAxis, where tighter coupling between the two is required to efficiently provide context.

Parameters

datums - a DatumVector
context - visible range, context should be provided.

Returns:

a String[]

[search for examples] [view on GitHub] [view on old javadoc] [view source]


format

format( Datum datum ) → String

Parameters

datum - a Datum

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]

format( Datum datum, Units units ) → String

grannyFormat

grannyFormat( Datum datum ) → String

Returns the datum formatted as a String with special formatting characters. As with format, this should be out-of-context and should be tagged with the Units. The default implementation just returns the result of {@link #format(org.das2.datum.Datum)}

Parameters

datum - a Datum

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]

grannyFormat( Datum datum, Units units ) → String