Package net.sf.freecol.common.model
Enum NativeTrade.NativeTradeAction
- java.lang.Object
-
- java.lang.Enum<NativeTrade.NativeTradeAction>
-
- net.sf.freecol.common.model.NativeTrade.NativeTradeAction
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<NativeTrade.NativeTradeAction>
- Enclosing class:
- NativeTrade
public static enum NativeTrade.NativeTradeAction extends java.lang.Enum<NativeTrade.NativeTradeAction>
The type of native trade command.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACK_BUY
ACK_BUY_HAGGLE
ACK_GIFT
ACK_OPEN
ACK_SELL
ACK_SELL_HAGGLE
BUY
CLOSE
GIFT
NAK_GOODS
NAK_HAGGLE
NAK_HOSTILE
NAK_INVALID
NAK_NOSALE
OPEN
SELL
-
Field Summary
Fields Modifier and Type Field Description private boolean
closing
Does this action close the trade?private boolean
fromEuropeans
Should this action originate with a European player?
-
Constructor Summary
Constructors Modifier Constructor Description private
NativeTradeAction(boolean closing, boolean fromEuropeans)
Create a new native trade action.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isClosing()
Is this a closing action?boolean
isEuropean()
Should this action have come from a European player?static NativeTrade.NativeTradeAction
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NativeTrade.NativeTradeAction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPEN
public static final NativeTrade.NativeTradeAction OPEN
-
CLOSE
public static final NativeTrade.NativeTradeAction CLOSE
-
BUY
public static final NativeTrade.NativeTradeAction BUY
-
SELL
public static final NativeTrade.NativeTradeAction SELL
-
GIFT
public static final NativeTrade.NativeTradeAction GIFT
-
ACK_OPEN
public static final NativeTrade.NativeTradeAction ACK_OPEN
-
ACK_BUY
public static final NativeTrade.NativeTradeAction ACK_BUY
-
ACK_SELL
public static final NativeTrade.NativeTradeAction ACK_SELL
-
ACK_GIFT
public static final NativeTrade.NativeTradeAction ACK_GIFT
-
ACK_BUY_HAGGLE
public static final NativeTrade.NativeTradeAction ACK_BUY_HAGGLE
-
ACK_SELL_HAGGLE
public static final NativeTrade.NativeTradeAction ACK_SELL_HAGGLE
-
NAK_GOODS
public static final NativeTrade.NativeTradeAction NAK_GOODS
-
NAK_HAGGLE
public static final NativeTrade.NativeTradeAction NAK_HAGGLE
-
NAK_HOSTILE
public static final NativeTrade.NativeTradeAction NAK_HOSTILE
-
NAK_NOSALE
public static final NativeTrade.NativeTradeAction NAK_NOSALE
-
NAK_INVALID
public static final NativeTrade.NativeTradeAction NAK_INVALID
-
-
Method Detail
-
values
public static NativeTrade.NativeTradeAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NativeTrade.NativeTradeAction c : NativeTrade.NativeTradeAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NativeTrade.NativeTradeAction valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isClosing
public boolean isClosing()
Is this a closing action?- Returns:
- True if a closing action.
-
isEuropean
public boolean isEuropean()
Should this action have come from a European player?- Returns:
- True if a European action.
-
-