package de.geolykt.starloader.api.empire; import java.util.Collection; import org.jetbrains.annotations.ApiStatus.ScheduledForRemoval; import org.jetbrains.annotations.NotNull; import de.geolykt.starloader.DeprecatedSince; /** * Object that defines a war between two parties. */ public interface War extends Dateable { /** * Obtains the amount of time that has passed since the war was started relative to the time in which * the last star was taken. * * @see #getStartDate() * @see #getDateOfLastAction() */ @Override public default int getAge() { return getDateOfLastAction() - getStartDate(); } /** * Obtains an immutable view of empires involved on the "aggressor" side. * Changes in the constellation of empires are reflected in the view. However, * implementors are advised to ensure that iteration of the returned collection * can happen even if a change occurs. * *
In a vanilla context this is always a singleton, but mods or future changes in game design * may introduce the ability of large-scale warfare. * *
The term aggressor or defender is made up in a vanilla context. However mods or future changes * in game design may add some merit to the naming choice. * * @return An immutable view of empires on the "aggressor" side. * @since 2.0.0 * @deprecated The {@link ActiveEmpire} interface is scheduled for removal. */ @Deprecated @ScheduledForRemoval(inVersion = "3.0.0") @DeprecatedSince("2.0.0") @NotNull public Collection<@NotNull ActiveEmpire> getAggressorParty(); /** * Obtains an immutable view of empires involved on the "aggressor" side. * Changes in the constellation of empires are reflected in the view. However, * implementors are advised to ensure that iteration of the returned collection * can happen even if a change occurs. * *
In a vanilla context this is always a singleton, but mods or future changes in game design * may introduce the ability of large-scale warfare. * *
The term aggressor or defender is made up in a vanilla context. However mods or future changes
* in game design may add some merit to the naming choice.
*
* @return An immutable view of empires on the "aggressor" side.
* @since 2.0.0
*/
@NotNull
public Collection In a vanilla context this is always a singleton, but mods or future changes in game design
* may introduce the ability of large-scale warfare.
*
* The term aggressor or defender is made up in a vanilla context. However mods or future changes
* in game design may add some merit to the naming choice.
*
* @return An immutable view of empires on the "defender" side.
* @since 2.0.0
* @deprecated The {@link ActiveEmpire} interface is scheduled for removal.
*/
@Deprecated
@ScheduledForRemoval(inVersion = "3.0.0")
@DeprecatedSince("2.0.0")
@NotNull
public Collection<@NotNull ActiveEmpire> getDefenderParty();
/**
* Obtains an immutable view of empires involved on the "defender" side.
* Changes in the constellation of empires are reflected in the view. However,
* implementors are advised to ensure that iteration of the returned collection
* can happen even if a change occurs.
*
* In a vanilla context this is always a singleton, but mods or future changes in game design
* may introduce the ability of large-scale warfare.
*
* The term aggressor or defender is made up in a vanilla context. However mods or future changes
* in game design may add some merit to the naming choice.
*
* @return An immutable view of empires on the "defender" side.
* @since 2.0.0
*/
@NotNull
public Collection