Class KeySort

  • All Implemented Interfaces:
    KnowledgeBaseConsumer, PredicateFactory

    public final class KeySort
    extends AbstractSingleResultPredicate
    keysort(X,Y) - sorts a list of key/value pairs.

    Sorts the list X, containing key/value pairs, and attempts to unify the result with Y. Key/value pairs are compound terms with a functor of - and two arguments. The first argument is the key and the second argument is the value. It is the key of the key/value pairs that is used to sort the elements contained in X. (Note: duplicates are not removed.)

    • Field Detail

      • KEY_VALUE_PAIR_COMPARATOR

        private static final java.util.Comparator<Term> KEY_VALUE_PAIR_COMPARATOR
    • Constructor Detail

      • KeySort

        public KeySort()