org.flexiblepower.ral.values
Q - The quantity of the values that are stored here.public class ConstraintList<Q extends javax.measure.quantity.Quantity> extends java.util.AbstractList<Constraint<Q>>
ConstraintList is used as a method to describe several modes. It is most commonly used for representing
different possible charge speeds in a buffer. This is a list of several values or ranges of values.| Modifier and Type | Class and Description |
|---|---|
static class |
ConstraintList.Builder<Q extends javax.measure.quantity.Quantity>
The
ConstraintList.Builder is a convenience class to easily construct new immutable ConstraintLists. |
| Constructor and Description |
|---|
ConstraintList(java.util.List<Constraint<Q>> list) |
| Modifier and Type | Method and Description |
|---|---|
static <Q extends javax.measure.quantity.Quantity> |
create(javax.measure.unit.Unit<Q> unit)
Starts a new builder for constructing a
ConstraintList using a default unit value. |
Constraint<Q> |
get(int index) |
javax.measure.Measurable<Q> |
getMaximum() |
javax.measure.Measurable<Q> |
getMinimum() |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringpublic ConstraintList(java.util.List<Constraint<Q>> list)
list - Creates a new ConstraintList from a given list of constraints.public static <Q extends javax.measure.quantity.Quantity> ConstraintList.Builder<Q> create(javax.measure.unit.Unit<Q> unit)
ConstraintList using a default unit value.unit - The default unit value that will be used in the ConstraintList.Builder.addSingle(double) and
ConstraintList.Builder.addRange(double, double) methods.public Constraint<Q> get(int index)
get in interface java.util.List<Constraint<Q extends javax.measure.quantity.Quantity>>get in class java.util.AbstractList<Constraint<Q extends javax.measure.quantity.Quantity>>public int size()
size in interface java.util.Collection<Constraint<Q extends javax.measure.quantity.Quantity>>size in interface java.util.List<Constraint<Q extends javax.measure.quantity.Quantity>>size in class java.util.AbstractCollection<Constraint<Q extends javax.measure.quantity.Quantity>>public javax.measure.Measurable<Q> getMinimum()
Constraint in this list.public javax.measure.Measurable<Q> getMaximum()
Constraint in this list.