public class QualifiedValues<T> extends ArrayList<QualifiedValue<T>>
modCount| Constructor and Description |
|---|
QualifiedValues() |
QualifiedValues(QualifiedValue<T> value) |
| Modifier and Type | Method and Description |
|---|---|
<U> void |
checkConversion(Class<U> clazz)
Checks that the conversion can be done on all of the object's
QualifiedValue, but do not modify these
values. |
<U> QualifiedValues<U> |
convertTo(Class<U> clazz)
Converts this object's values to the specified type.
|
QualifiedValues<Double> |
convertToDouble()
Converts this object's values to Double.
|
List<Type> |
getValuesTypes()
Return the list of types of the values.
|
boolean |
isNA()
Tells if all values are
NA. |
boolean |
isNumeric()
Tells if all values are
numeric. |
boolean |
isValid() |
List<T> |
rawValues()
Returns the list of the
QualifiedValue-s' values. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic QualifiedValues()
public QualifiedValues(QualifiedValue<T> value)
public boolean isValid()
public QualifiedValues<Double> convertToDouble() throws ValueConverters.ConversionException
this.convertTo(Double.class).ValueConverters.ConversionException - if the value could not be converted to a double. Note that this may happen even if
isNumeric() is True: converting a rational with a denominator equal to zero throw
a ConversionException.isNumeric()public boolean isNA()
NA.true if all values are NA, false otherwise.public List<T> rawValues()
QualifiedValue-s' values.public List<Type> getValuesTypes()
Type.of(Object)public boolean isNumeric()
numeric.true if all values are numeric, false otherwise.convertToDouble()public <U> void checkConversion(Class<U> clazz) throws ValueConverters.ConversionException
QualifiedValue, but do not modify these
values.U - the class to which the value should be convertedclazz - the class to which the value should be convertedValueConverters.ConversionException - raised if the conversion cannot be doneconvertTo(Class)public <U> QualifiedValues<U> convertTo(Class<U> clazz) throws ValueConverters.ConversionException
ConversionException is raised, and the values are left untouched.U - class of the converted valuesclazz - the class of the converted valuesValueConverters.ConversionException - if at least one element could not be convertedcheckConversion(Class),
convertToDouble()Copyright © 2013–2021 Sébastien Bigaret, Patrick Meyer. All rights reserved.