org.flexiblepower.ral.values
public final class ConstraintProfile<Q extends javax.measure.quantity.Quantity> extends Profile<Constraint<Q>>
Profile
and is parameterized with a Constraint
.Modifier and Type | Class and Description |
---|---|
static class |
ConstraintProfile.Builder<Q extends javax.measure.quantity.Quantity>
The Builder object that will be used to easily create
ConstraintProfile s. |
Profile.Element<T>
Constructor and Description |
---|
ConstraintProfile(Profile.Element<Constraint<Q>>... elements)
Constructor of the
ConstraintProfile , using the elements given. |
Modifier and Type | Method and Description |
---|---|
static <Q extends javax.measure.quantity.Quantity> |
create() |
ConstraintProfile<Q> |
subProfile(javax.measure.Measurable<javax.measure.quantity.Duration> offset,
javax.measure.Measurable<javax.measure.quantity.Duration> duration)
An extension of the profile should implement this method to be able to split the profile up into parts.
|
get, getElementAtOffset, getTotalDuration, size
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
public ConstraintProfile(Profile.Element<Constraint<Q>>... elements)
ConstraintProfile
, using the elements given. The elements will be copied into a new
array.elements
- The elements that are stored in this profilepublic static <Q extends javax.measure.quantity.Quantity> ConstraintProfile.Builder<Q> create()
ConstraintProfile
s.public ConstraintProfile<Q> subProfile(javax.measure.Measurable<javax.measure.quantity.Duration> offset, javax.measure.Measurable<javax.measure.quantity.Duration> duration)
Profile
subProfile
in class Profile<Constraint<Q extends javax.measure.quantity.Quantity>>
offset
- The offset of where the subsection of the profile should start. This should always be >= 0.duration
- The total duration of the new profile. The offset + duration should never be more than the total
duration of this profile.Profile
implementation that represents the selected subprofile.