Class IsEmpty

    • Constructor Detail

      • IsEmpty

        public IsEmpty()
    • Method Detail

      • 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 java.util.function.Function<java.util.List<Term>,​java.util.function.Function<Context,​java.util.function.Function<Graph,​Either<InContext<Error_>,​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> java.lang.Boolean apply​(PersistentSet<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