Class InsertionResult<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>


  • public class InsertionResult<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    The result of an insertion operation involving autojoining. The result can be one of:
    1. a new archetype should be inserted
    2. an existing game object has been modified
    3. the operation failed; nothing has been modified or should be inserted
    • Constructor Detail

      • InsertionResult

        public InsertionResult()
        Creates an empty new instance.
      • InsertionResult

        public InsertionResult​(@NotNull
                               G gameObject)
        Creates a new instance for a game object.
        Parameters:
        gameObject - the game object that has been modified
      • InsertionResult

        public InsertionResult​(@NotNull
                               R archetype)
        Creates a new instance for an archetype.
        Parameters:
        archetype - the archetype that should be inserted or null if no archetype should be inserted
    • Method Detail

      • getGameObject

        @Nullable
        public G getGameObject()
        Returns the GameObject that has been modified.
        Returns:
        the game object that has been modified or null if no game object has been modified
      • getArchetype

        @Nullable
        public R getArchetype()
        Returns the Archetype that should be inserted.
        Returns:
        the archetype that should be inserted or null if no archetype should be inserted