org.flexiblepower.ral.values
Q
- The quantity of the values that are stored herepublic static class ConstraintList.Builder<Q extends javax.measure.quantity.Quantity> extends java.lang.Object
ConstraintList.Builder
is a convenience class to easily construct new immutable ConstraintList
s.Modifier and Type | Method and Description |
---|---|
ConstraintList.Builder<Q> |
addRange(double lowerBound,
double upperBound)
Adds a ranged value to the list using the default unit.
|
ConstraintList.Builder<Q> |
addRange(javax.measure.Measurable<Q> lowerBound,
javax.measure.Measurable<Q> upperBound)
Adds a ranged value to the list.
|
ConstraintList.Builder<Q> |
addSingle(double value)
Adds a single value to the list using the default unit.
|
ConstraintList.Builder<Q> |
addSingle(javax.measure.Measurable<Q> value)
Adds a single value to the list.
|
ConstraintList<Q> |
build() |
public ConstraintList.Builder<Q> addSingle(javax.measure.Measurable<Q> value)
value
- The value to be addedpublic ConstraintList.Builder<Q> addSingle(double value)
value
- The value to be addedpublic ConstraintList.Builder<Q> addRange(javax.measure.Measurable<Q> lowerBound, javax.measure.Measurable<Q> upperBound)
lowerBound
- The lower bound of the rangeupperBound
- The upper bound of the rangepublic ConstraintList.Builder<Q> addRange(double lowerBound, double upperBound)
lowerBound
- The lower bound of the rangeupperBound
- The upper bound of the rangepublic ConstraintList<Q> build()
ConstraintList
that contains the values from this Builder.