Schnittstelle Visitor<T>

Typparameter:
T - the type of result returned by the visit methods

public interface Visitor<T>
An interface for implementing the Visitor pattern for different types of elements in the Battleship model.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    Visits a Battleship element.
    visit(Shot shot)
    Visits a Shot element.
  • Methodendetails

    • visit

      T visit(Shot shot)
      Visits a Shot element.
      Parameter:
      shot - the Shot element to visit
      Gibt zurück:
      the result of visiting the Shot element
    • visit

      T visit(Battleship ship)
      Visits a Battleship element.
      Parameter:
      ship - the Battleship element to visit
      Gibt zurück:
      the result of visiting the Battleship element