Enum Class RelationType
- All Implemented Interfaces:
Serializable, Comparable<RelationType>, Constable
外交关系类型
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription同盟 - 共同防御协议同盟 - 共同进攻协议友好状态敌对状态中立状态科技协议贸易协议战争状态 -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanstatic RelationTypeReturns the enum constant of this class with the specified name.static RelationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WAR
战争状态 -
HOSTILE
敌对状态 -
NEUTRAL
中立状态 -
FRIENDLY
友好状态 -
ALLIANCE_DEFENSIVE
同盟 - 共同防御协议 -
ALLIANCE_OFFENSIVE
同盟 - 共同进攻协议 -
TRADE_AGREEMENT
贸易协议 -
TECH_AGREEMENT
科技协议
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isAlliance
public boolean isAlliance() -
isHostile
public boolean isHostile() -
isFriendly
public boolean isFriendly()
-