Class Singleton

    • Constructor Summary

      Constructors 
      Constructor Description
      Singleton()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      java.util.function.Function<V,​java.util.Map<K,​V>>
      apply​(K key)
      Creates a map with one element.
      static <K,​V>
      java.util.Map<K,​V>
      apply​(K key, V value)
      Creates a map with one element.
      protected java.util.function.Function<java.util.List<Term>,​java.util.function.Function<InferenceContext,​java.util.function.Function<Graph,​Either<Error_,​Term>>>> implementation()
      Get the implementation of this primitive function.
      Name name()
      Get the name of this primitive function.
      TypeScheme type()
      Get the type scheme of this primitive function.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Singleton

        public Singleton()
    • Method Detail

      • name

        public Name name()
        Get the name of this primitive function.
        Specified by:
        name in class PrimitiveFunction
        Returns:
        the name
      • apply

        public static <K,​V> java.util.function.Function<V,​java.util.Map<K,​V>> apply​(K key)
        Creates a map with one element.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        key - the key
        Returns:
        a function that takes a value and returns the singleton map
      • apply

        public static <K,​V> java.util.Map<K,​V> apply​(K key,
                                                                 V value)
        Creates a map with one element.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        key - the key
        value - the value
        Returns:
        the singleton map