Schnittstelle Item

Alle bekannten Implementierungsklassen:
Battleship, Shot

public interface Item
An interface representing any item on a ship map. It extends the IntPosition interface to provide position information.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    <T> T
    accept(Visitor<T> visitor)
    Accepts a visitor to perform operations on the item.
    void
    Accepts a visitor to perform operations on the item without returning a result.
  • Methodendetails

    • accept

      <T> T accept(Visitor<T> visitor)
      Accepts a visitor to perform operations on the item.
      Typparameter:
      T - the type of result returned by the visitor
      Parameter:
      visitor - the visitor performing operations on the item
      Gibt zurück:
      the result of the visitor's operation on the item
    • accept

      void accept(VoidVisitor visitor)
      Accepts a visitor to perform operations on the item without returning a result.
      Parameter:
      visitor - the visitor performing operations on the item