|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelper
org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelperWithVarious
org.decisiondeck.jmcda.persist.xmcda2.XMCDAAlternativesScores
public class XMCDAAlternativesScores
Methods for reading and writing alternative scores from and to XMCDA fragments.
| Constructor Summary | |
|---|---|
XMCDAAlternativesScores()
Creates a new object which will use the default error management strategy XMCDAErrorsManager.ErrorManagement.THROW. |
|
XMCDAAlternativesScores(XMCDAErrorsManager errorsManager)
Creates a new object delegating error management to the given error manager in case of unexpected data read. |
|
| Method Summary | |
|---|---|
Set<Alternative> |
getAlternatives()
Retrieves a writeable view of the set of alternatives stored in this object. |
AlternativesScores |
readScoredAlternatives(Collection<XAlternativesValues> xAlternativesValuesList)
Retrieves a mapping between the alternatives and the scores found in the given fragment. |
void |
setAlternatives(Set<Alternative> alternatives)
Sets the alternatives stored in this object as the given ones. |
XAlternativesValues |
writeScoredAlternatives(AlternativesScores scoredAlternatives)
Retrieves the XMCDA equivalent of the given scores. |
| Methods inherited from class org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelper |
|---|
error, getStrategy, setStrategy |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMCDAAlternativesScores()
XMCDAErrorsManager.ErrorManagement.THROW.
public XMCDAAlternativesScores(XMCDAErrorsManager errorsManager)
errorsManager - not null.| Method Detail |
|---|
public AlternativesScores readScoredAlternatives(Collection<XAlternativesValues> xAlternativesValuesList)
throws InvalidInputException
Retrieves a mapping between the alternatives and the scores found in the given fragment.
In case of unexpected data, an exception is thrown if this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy, otherwise, non conforming informations will be skipped.
xAlternativesValuesList - not null.
null.
InvalidInputException - iff unexpected content has been read and this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy.public XAlternativesValues writeScoredAlternatives(AlternativesScores scoredAlternatives)
scoredAlternatives - not null.
null.public Set<Alternative> getAlternatives()
null.public void setAlternatives(Set<Alternative> alternatives)
alternatives - not null, may be empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||