public static final class DatedDataSet.Builder
extends java.lang.Object
DatedDataSet
objects
e.g. for testing purposes.Instances of this builder class are designed for single-threaded use only. It's fine to create and use instances in multiple concurrent threads, but, in the absence of external synchronization, the use of each individual builder instance should be restricted to one thread only.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DatedDataSet.Builder |
addValue(DatedDataValue v)
Adds a
DatedDataValue object. |
DatedDataSet |
build() |
DatedDataSet.Builder |
setPercentageEstimated(double percentageEstimated) |
public DatedDataSet.Builder addValue(DatedDataValue v)
DatedDataValue
object. Values must be added in
chronological order, and they must be continuous (each should start
the day after the previous finished).v
- the non-null DatedDataValue
to add.this
, for method chaining.java.lang.NullPointerException
- if v
is null
.java.lang.IllegalArgumentException
- if v
doesn't start after the last
DatedDataValue
added.public DatedDataSet.Builder setPercentageEstimated(double percentageEstimated)
public DatedDataSet build()
java.lang.IllegalStateException
- if there is not at least one
DatedDataValue
.
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.