org.flexiblepower.ral.values
public final class CommodityProfile extends Profile<CommodityMeasurables>
Profile
. By parameterizing this class with the billable quantity (BQ) and the flow
quantity (FQ) it can be validated whether all commodity profile elements are of the same commodity. CommodityProfile
does not have any additional attributes.Modifier and Type | Class and Description |
---|---|
static class |
CommodityProfile.Builder
The Builder object that will be used to easily create
CommodityProfile s. |
Profile.Element<T>
Constructor and Description |
---|
CommodityProfile(Profile.Element<CommodityMeasurables>... elements)
Constructor of the
CommodityProfile , using the elements given. |
Modifier and Type | Method and Description |
---|---|
static CommodityProfile.Builder |
create() |
CommoditySet |
getCommodities() |
Profile<CommodityMeasurables> |
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 CommodityProfile(Profile.Element<CommodityMeasurables>... elements)
CommodityProfile
, using the elements given. The elements will be copied into a new
array.elements
- The elements that are stored in this profilepublic static CommodityProfile.Builder create()
CommodityProfile
s.public CommoditySet getCommodities()
public Profile<CommodityMeasurables> subProfile(javax.measure.Measurable<javax.measure.quantity.Duration> offset, javax.measure.Measurable<javax.measure.quantity.Duration> duration)
Profile
subProfile
in class Profile<CommodityMeasurables>
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.