Class IsEmpty


public class IsEmpty extends PrimitiveFunction
Checks if a set is empty.
  • Constructor Details

    • IsEmpty

      public IsEmpty()
  • Method Details

    • name

      public Name name()
      Returns the name of this primitive function.
      Specified by:
      name in class PrimitiveFunction
      Returns:
      the name "hydra.lib.sets.isEmpty"
    • type

      public TypeScheme type()
      Returns the type scheme of this function.
      Specified by:
      type in class PrimitiveFunction
      Returns:
      the type scheme for a function that checks if a set is empty
    • implementation

      protected Function<List<Term>,Flow<Graph,Term>> implementation()
      Provides the implementation of this primitive function.
      Specified by:
      implementation in class PrimitiveFunction
      Returns:
      a function that transforms terms to a flow of graph and term
    • apply

      public static <X> Boolean apply(Set<X> arg)
      Checks if a set is empty.
      Type Parameters:
      X - the type of elements in the set
      Parameters:
      arg - the set to check
      Returns:
      true if the set is empty, false otherwise