
org.decision_deck.jmcda.structure.thresholds.ThresholdsZeroes 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 java.util.Set;
import org.decision_deck.jmcda.structure.Criterion;
import org.decision_deck.utils.collection.SetBackedMap;
import com.google.common.base.Functions;
import com.google.common.collect.ImmutableMap;
class ThresholdsZeroes extends ThresholdsMapBased implements Thresholds {
private final Set m_criteria;
private final ImmutableMap m_empty = ImmutableMap.of();
public ThresholdsZeroes(Set criteria) {
checkNotNull(criteria);
m_criteria = criteria;
}
@Override
public Map getVetoThresholds() {
return m_empty;
}
@Override
public Map getPreferenceThresholds() {
return new SetBackedMap(m_criteria, Functions.constant(Double.valueOf(0d)));
}
@Override
public Map getIndifferenceThresholds() {
return new SetBackedMap(m_criteria, Functions.constant(Double.valueOf(0d)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy