# Interface MaterialVisitor

All Known Implementing Classes:
  `ShippingCostCalculator`

public interface MaterialVisitor
Visitor interface for implementing the Visitor pattern. Allows adding new operations to the Material hierarchy without modifying existing classes.

This pattern is particularly useful for operations that need to behave differently based on the concrete type of Material.

Since:
  2024-09-15
Version:
  2.0
Author:
  Navid Mohaghegh

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `visit(AudioBook audioBook)`
  Visits an AudioBook.
  `void`
  `visit(EBook ebook)`
  Visits an EBook.
  `void`
  `visit(Magazine magazine)`
  Visits a Magazine.
  `void`
  `visit(PrintedBook book)`
  Visits a PrintedBook.
  `void`
  `visit(VideoMaterial video)`
  Visits a VideoMaterial.

- ## Method Details

  - ### visit

    void visit(PrintedBook book)
    Visits a PrintedBook.
    Parameters:
      `book` - the printed book to visit

  - ### visit

    void visit(Magazine magazine)
    Visits a Magazine.
    Parameters:
      `magazine` - the magazine to visit

  - ### visit

    void visit(AudioBook audioBook)
    Visits an AudioBook.
    Parameters:
      `audioBook` - the audio book to visit

  - ### visit

    void visit(VideoMaterial video)
    Visits a VideoMaterial.
    Parameters:
      `video` - the video material to visit

  - ### visit

    void visit(EBook ebook)
    Visits an EBook.
    Parameters:
      `ebook` - the e-book to visit