Class Trivial

All Implemented Interfaces:
Lattice

public class Trivial
extends AbstractDistributiveLattice
The trivial distributive lattice of just one element.
  • Constructor Details

  • Method Details

    • valueOf

      public Element valueOf​(String name)
      Description copied from interface: Lattice
      Return an element of this lattice, given its name.

      Certain lattices make it possible to define names for elements. This method returns the element corresponding to the provided name.

      Parameters:
      name - the name of an element of this lattice.
      Returns:
      the element of this lattice named name.
    • generators

      public Collection<Element> generators()
      Description copied from interface: Lattice
      Return a collection of generators for the lattice. The set will not include zero or one. There is no guarantee of freeness or minimality.
      Returns:
      a collection of generators.
    • one

      public Element one()
      Description copied from interface: Lattice
      Return the one of this lattice.

      Note that there is no guarantee that the returned element is the only element representing one in this lattice. Other ones may arise from computations, but they will always be equal to the element returned by this method.

      Returns:
      the one of this lattice.
    • zero

      public Element zero()
      Description copied from interface: Lattice
      Return the zero of this lattice.

      Note that there is no guarantee that the returned element is the only element representing zero in this lattice. Other zeroes may arise from computations, but they will always be equal to the element returned by this method.

      Returns:
      the zero of this lattice.
    • join

      public Element join​(Element... elements)
      Description copied from interface: Lattice
      Return the join of the provided elements. In particular, upon the empty list of arguments returns zero, and upon a singleton list the only specified element.
      Parameters:
      elements - the elements whose join has to be computed.
      Returns:
      the join of the provided elements.
    • meet

      public Element meet​(Element... elements)
      Description copied from interface: Lattice
      Return the meet of the provided elements. In particular, upon the empty list of arguments returns one, and upon a singleton list the only specified element.
      Parameters:
      elements - the elements whose meet has to be computed.
      Returns:
      the meet of the provided elements.
    • toString

      public String toString()
      Overrides:
      toString in class Object