
org.decision_deck.jmcda.structure.thresholds.ThresholdsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of base Show documentation
Show all versions of base Show documentation
The base classes of the J-MCDA project. Contains the main structure classes that define MCDA concepts such as alternatives and performance matrixes.
The newest version!
package org.decision_deck.jmcda.structure.thresholds;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.decision_deck.jmcda.structure.Criterion;
import org.decision_deck.utils.collection.CollectionUtils;
class ThresholdsImpl extends ThresholdsMapBased implements Thresholds {
/**
* Never null
.
*/
private final Map m_indiffs = CollectionUtils.newMapNoNull();
/**
* Never null
.
*/
private final Map m_prefs = CollectionUtils.newMapNoNull();
/**
* Never null
.
*/
private final Map m_vetoes = CollectionUtils.newMapNoNull();
@Override
public Map getVetoThresholds() {
return m_vetoes;
}
@Override
public Map getPreferenceThresholds() {
return m_prefs;
}
@Override
public Map getIndifferenceThresholds() {
return m_indiffs;
}
/**
* @param prefs
* not null
.
* @param indiffs
* not null
.
* @param vetoes
* not null
.
*/
public ThresholdsImpl(Map prefs, Map indiffs, Map vetoes) {
super();
checkNotNull(prefs);
checkNotNull(indiffs);
checkNotNull(vetoes);
getPreferenceThresholds().putAll(prefs);
getIndifferenceThresholds().putAll(indiffs);
getVetoThresholds().putAll(vetoes);
}
public ThresholdsImpl(Thresholds source) {
super();
checkNotNull(source);
getPreferenceThresholds().putAll(source.getPreferenceThresholds());
getIndifferenceThresholds().putAll(source.getIndifferenceThresholds());
getVetoThresholds().putAll(source.getVetoThresholds());
}
public ThresholdsImpl() {
super();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy