java.lang.Object
com.darkcollective.relix.provenance.internal.BuiltinSemiringLibrary
All Implemented Interfaces:
SemiringLibrary

public final class BuiltinSemiringLibrary extends Object implements SemiringLibrary
The semirings this module ships: boolean existence, ℕ multiplicity, tropical shortest-path, the security lattice, ℕ[X] lineage and cheapest-route.

It is an ordinary SemiringLibrary and is read through the same seam a third-party one is, so the bundled six are not a privileged case that an installed semiring has to be worked around. It is not discovered by ServiceLoader — it lives in the same module as the catalog that reads it and is registered directly, so the built-ins are present whatever the packaging.

It ships at priority 0, which is what lets an installed library either replace one of these by declaring a higher priority or fill gaps around them by declaring a lower one.

  • Field Details

  • Method Details

    • name

      public String name()
      Description copied from interface: SemiringLibrary
      A short identifier for this library, used in diagnostics — including the one that reports two libraries offering the same semiring name.
      Specified by:
      name in interface SemiringLibrary
      Returns:
      the library's name; never null or blank
    • semirings

      public List<NamedSemiring> semirings()
      Description copied from interface: SemiringLibrary
      The semirings this library offers.
      Specified by:
      semirings in interface SemiringLibrary
      Returns:
      the semirings, each with the names it answers to; never null