Package hydra.lib.sets
Class IsEmpty
- java.lang.Object
-
- hydra.tools.PrimitiveFunction
-
- hydra.lib.sets.IsEmpty
-
public class IsEmpty extends PrimitiveFunction
Checks if a set is empty.
-
-
Constructor Summary
Constructors Constructor Description IsEmpty()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <X> java.lang.Booleanapply(PersistentSet<X> arg)Checks if a set is empty.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.Namename()Returns the name of this primitive function.TypeSchemetype()Returns the type scheme of this function.-
Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
-
-
-
Method Detail
-
name
public Name name()
Returns the name of this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the name "hydra.lib.sets.isEmpty"
-
type
public TypeScheme type()
Returns the type scheme of this function.- Specified by:
typein classPrimitiveFunction- 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:
implementationin classPrimitiveFunction- 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
-
-