source: java2python/geniuswebtranslator/geniuswebsrc/geniusweb/profile/Profile.java@ 818

Last change on this file since 818 was 804, checked in by wouter, 7 months ago

#278 added NonNull annotation in many places in the geniusweb code

File size: 1.8 KB
Line 
1package geniusweb.profile;
2
3import org.eclipse.jdt.annotation.NonNull;
4
5import com.fasterxml.jackson.annotation.JsonSubTypes;
6import com.fasterxml.jackson.annotation.JsonTypeInfo;
7
8import geniusweb.issuevalue.Bid;
9import geniusweb.issuevalue.Domain;
10import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
11import geniusweb.profile.utilityspace.SumOfGroupsUtilitySpace;
12
13/**
14 * Profile is a very general object describing how much a {@link Bid} is
15 * preferred. "is preferred" can be worked out in different ways, eg by a
16 * function "isBetter" that says if bid1 is preferred over bid2, or by assigning
17 * utility values to each bid that says how much I like that particular bid. All
18 * profiles should be implemented immutable
19 */
20@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
21@JsonSubTypes({ @JsonSubTypes.Type(value = LinearAdditiveUtilitySpace.class),
22 @JsonSubTypes.Type(value = DefaultPartialOrdering.class),
23 @JsonSubTypes.Type(value = SumOfGroupsUtilitySpace.class) })
24public interface Profile {
25
26 /**
27 *
28 * @return the name of this profile. Must be simple name (a-Z, 0-9)
29 */
30 @NonNull
31 String getName();
32
33 /**
34 * @return the domain in which this profile is defined.
35 */
36 @NonNull
37 Domain getDomain();
38
39 /**
40 *
41 * @return a (hypothetical) bid that is the best alternative to a
42 * non-agreement. Only bids that are equal or better should be
43 * accepted. If a negotiation does not reach an agreement, the party
44 * can get this offer somewhere else. This replaces the older notion
45 * of a "reservation value" and is more general. If null, there is
46 * no reservation bid and any agreement is better than no agreement.
47 * This bid can be partial.
48 *
49 */
50 Bid getReservationBid();
51}
Note: See TracBrowser for help on using the repository browser.