public class SampleBuilder
extends java.lang.Object
It provides default behaviour for number formatting.
The default numberformat used is a DecimalFormat whose pattern is the
following :
"#########0.00#"
Constructor and Description |
---|
SampleBuilder(SampleMetadata metadata)
Construct a SampleBuilder with default formatter
|
SampleBuilder(SampleMetadata metadata,
java.text.NumberFormat floatFormatter)
Construct a SampleBuilder.
|
Modifier and Type | Method and Description |
---|---|
SampleBuilder |
add(double e) |
SampleBuilder |
add(long e) |
SampleBuilder |
add(java.lang.String e) |
Sample |
build() |
SampleMetadata |
getMetadata() |
public SampleBuilder(SampleMetadata metadata, java.text.NumberFormat floatFormatter)
metadata
- the details about expected sample data (must not be null
)floatFormatter
- the formatter to be used (the default formatter will be used, if
null
is given.)public SampleBuilder(SampleMetadata metadata)
metadata
- the details about expected sample data (must not be null
)public final SampleMetadata getMetadata()
public SampleBuilder add(java.lang.String e)
public SampleBuilder add(long e)
public SampleBuilder add(double e)
public Sample build()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.