public class AlternativesValues<VALUE_TYPE> extends LinkedHashMap<Alternative,LabelledQValues<VALUE_TYPE>> implements HasDescription, CommonAttributes, XMCDARootElement
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
AlternativesValues() |
| Modifier and Type | Method and Description |
|---|---|
AlternativesValues<Double> |
asDouble() |
<U> AlternativesValues<U> |
convertTo(Class<U> clazz) |
Set<Alternative> |
getAlternatives() |
Description |
getDescription() |
String |
id() |
boolean |
isNumeric() |
String |
mcdaConcept() |
String |
name() |
LabelledQValues<VALUE_TYPE> |
put(Alternative alternative,
QualifiedValue<VALUE_TYPE> qvalue) |
LabelledQValues<VALUE_TYPE> |
put(Alternative alternative,
VALUE_TYPE value) |
LabelledQValues<VALUE_TYPE> |
setDefault(Alternative alternative,
VALUE_TYPE defaultValue)
Return the value attached to the supplied alternative.
|
void |
setDescription(Description description) |
void |
setId(String id) |
void |
setMcdaConcept(String mcdaConcept) |
void |
setName(String name) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizepublic static final String TAG
public String id()
id in interface CommonAttributespublic void setId(String id)
setId in interface CommonAttributespublic String name()
name in interface CommonAttributespublic String mcdaConcept()
mcdaConcept in interface CommonAttributespublic void setName(String name)
setName in interface CommonAttributespublic void setMcdaConcept(String mcdaConcept)
setMcdaConcept in interface CommonAttributespublic void setDescription(Description description)
setDescription in interface HasDescriptionpublic Description getDescription()
getDescription in interface HasDescriptionpublic LabelledQValues<VALUE_TYPE> put(Alternative alternative, QualifiedValue<VALUE_TYPE> qvalue)
public LabelledQValues<VALUE_TYPE> put(Alternative alternative, VALUE_TYPE value)
public LabelledQValues<VALUE_TYPE> setDefault(Alternative alternative, VALUE_TYPE defaultValue)
alternative - the alternative for which the value is requesteddefaultValue - the default value to set if there is no value corresponding to the alternative already.public boolean isNumeric()
public Set<Alternative> getAlternatives()
public AlternativesValues<Double> asDouble() throws ValueConverters.ConversionException
public <U> AlternativesValues<U> convertTo(Class<U> clazz) throws ValueConverters.ConversionException
Copyright © 2013–2021 Sébastien Bigaret, Patrick Meyer. All rights reserved.