source: java2python/geniuswebtranslator/geniuswebsrc/geniusweb/profile/utilityspace/ValueSetUtilities.java@ 889

Last change on this file since 889 was 825, checked in by wouter, 5 months ago

#291 move annotation to above the javadoc

File size: 1.2 KB
Line 
1package geniusweb.profile.utilityspace;
2
3import java.math.BigDecimal;
4
5import org.eclipse.jdt.annotation.NonNull;
6
7import com.fasterxml.jackson.annotation.JsonSubTypes;
8import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
9import com.fasterxml.jackson.annotation.JsonTypeInfo;
10
11import geniusweb.issuevalue.Value;
12import geniusweb.issuevalue.ValueSet;
13
14@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
15@JsonSubTypes({ @Type(value = DiscreteValueSetUtilities.class),
16 @Type(value = NumberValueSetUtilities.class) })
17/**
18 * Provides a mechanism to map {@link Value}s into a utility (value in range
19 * [0,1]).
20 */
21public interface ValueSetUtilities {
22 @NonNull
23 /**
24 *
25 * @param value the {@link Value} to get the utility for
26 * @return the utility of the given value. MUST be in [0,1]. Should return 0
27 * if the value is unknown.
28 */
29
30 BigDecimal getUtility(@NonNull Value value);
31
32 /**
33 *
34 * @param valueset the valueset that is supposed match with this
35 * @return null if the ValueSetUtilities fits the given set of values , that
36 * means it can give utilities for all possible values in valueset.
37 * Or a string containing an explanation why not.
38 */
39 String isFitting(@NonNull ValueSet valueset);
40
41}
Note: See TracBrowser for help on using the repository browser.