public enum DataKey extends java.lang.Enum<DataKey> implements java.lang.Comparable<DataKey>
HashMap
s. See e.g.
AgreementEvent.getValues()
.
The keys also have a human-readable text version. This can be used as basis
for the column text strings for data display and logging.
The keys UTILS, FILES and AGENTS contain lists. The function
AgreementEvent#getFlatMap()
and AgreementEvent.getValues()
will convert these to strings and extend these keys with the agent number,
and we then have eg 3 columns "Utility 1", "Utility 2" and "Utility 3" in the
table. In the map, the UTILS field will be an List
with 3 values in
that case. see also AgreementEvent#getKeys()
.
The DataKeyTableModel
can handle such data directly.
Note that the order of the enum is irrelevant; the order in which the keys
are provided to the DataKeyTableModel
determines the column order.Enum Constant and Description |
---|
AGENTS |
DEADLINE |
DIST_NASH |
DIST_PARETO |
DIST_SOCIAL_WELFARE |
EXCEPTION |
FILES |
IS_AGREEMENT |
IS_DISCOUNT |
MAXUTIL |
MINUTIL |
NUM_AGREE |
ROUND |
RUNTIME |
UTILS |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
java.util.List<java.lang.String> |
getNames(int num) |
static DataKey |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataKey[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataKey RUNTIME
public static final DataKey ROUND
public static final DataKey EXCEPTION
public static final DataKey DEADLINE
public static final DataKey IS_AGREEMENT
public static final DataKey IS_DISCOUNT
public static final DataKey NUM_AGREE
public static final DataKey MINUTIL
public static final DataKey MAXUTIL
public static final DataKey DIST_PARETO
public static final DataKey DIST_NASH
public static final DataKey DIST_SOCIAL_WELFARE
public static final DataKey AGENTS
public static final DataKey UTILS
public static final DataKey FILES
public static DataKey[] values()
for (DataKey c : DataKey.values()) System.out.println(c);
public static DataKey valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getName()
public java.util.List<java.lang.String> getNames(int num)