org.flexiblepower.ral.values
public static final class ConstraintProfile.Builder<Q extends javax.measure.quantity.Quantity> extends java.lang.Object
ConstraintProfile
s.Modifier and Type | Method and Description |
---|---|
ConstraintProfile.Builder<Q> |
add(Constraint<Q> constraint) |
ConstraintProfile.Builder<Q> |
add(Profile.Element<Constraint<Q>> element) |
ConstraintProfile<Q> |
build() |
ConstraintProfile.Builder<Q> |
duration(javax.measure.Measurable<javax.measure.quantity.Duration> duration)
Set the duration and saves it for future creation of elements.
|
public ConstraintProfile.Builder<Q> duration(javax.measure.Measurable<javax.measure.quantity.Duration> duration)
duration
- The duration for the elementpublic ConstraintProfile.Builder<Q> add(Constraint<Q> constraint)
constraint
- The Constraint
that will be used (together with the set duration) to add a new element.java.lang.IllegalArgumentException
- when the duration has not been set using duration(Measurable)
public ConstraintProfile.Builder<Q> add(Profile.Element<Constraint<Q>> element)
element
- The element that needs to be added.public ConstraintProfile<Q> build()