Interface SnakVisitor<T>

Type Parameters:
T - the return type of the visitor
All Known Implementing Classes:
DatamodelConverter, SnakRdfConverter

public interface SnakVisitor<T>
A visitor for the various types of snaks in the datamodel. This should be used to avoid any type casting or instanceof checks when processing snaks.
Author:
Markus Kroetzsch
  • Method Summary

    Modifier and Type
    Method
    Description
    Visits a NoValueSnak and returns a result.
    Visits a SomeValueSnak and returns a result.
    Visits a ValueSnak and returns a result.
  • Method Details

    • visit

      T visit(ValueSnak snak)
      Visits a ValueSnak and returns a result.
      Parameters:
      snak - the snak to visit
      Returns:
      the result for this snak
    • visit

      T visit(SomeValueSnak snak)
      Visits a SomeValueSnak and returns a result.
      Parameters:
      snak - the snak to visit
      Returns:
      the result for this snak
    • visit

      T visit(NoValueSnak snak)
      Visits a NoValueSnak and returns a result.
      Parameters:
      snak - the snak to visit
      Returns:
      the result for this snak