Interface NeighborProvider

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface NeighborProvider
    Provides the neighbor relationships for a given shape.
    • Method Detail

      • getNeighbors

        java.util.List<Relationship> getNeighbors​(Shape shape)
        Gets the neighbor relationships of a shape.
        Parameters:
        shape - Shape to get neighbors for.
        Returns:
        Returns the found neighbors.
      • of

        static NeighborProvider of​(Model model)
        Creates a default NeighborProvider for the given model.
        Parameters:
        model - Model to create a neighbor provider for.
        Returns:
        Returns the created neighbor provider.
      • precomputed

        static NeighborProvider precomputed​(Model model)
        Creates a NeighborProvider that precomputes the neighbors of a model.
        Parameters:
        model - Model to create a neighbor provider for.
        Returns:
        Returns the created neighbor provider.
      • precomputed

        static NeighborProvider precomputed​(Model model,
                                            NeighborProvider provider)
        Creates a NeighborProvider that precomputes the neighbors of a model.
        Parameters:
        model - Model to create a neighbor provider for.
        provider - Provider to use when precomputing.
        Returns:
        Returns the created neighbor provider.