Class Op

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PrologTerm>

    public final class Op
    extends PrologTerm
    Prolog operator definition.
    See Also:
    Serialized Form
    • Field Detail

      • GNU_UNARY_PLUS

        public static final Op GNU_UNARY_PLUS
      • ISO_BITWISE_NEGATION

        public static final Op ISO_BITWISE_NEGATION
      • ISO_UNARY_MINUS

        public static final Op ISO_UNARY_MINUS
      • ISO_UNIFICATION

        public static final Op ISO_UNIFICATION
      • ISO_BITWISE_SHIFT

        public static final Op ISO_BITWISE_SHIFT
      • ISO_ORDER_TERM

        public static final Op ISO_ORDER_TERM
      • ISO_ORDER_ARITH

        public static final Op ISO_ORDER_ARITH
      • ISO_ARITH_PLUS_MINUS

        public static final Op ISO_ARITH_PLUS_MINUS
      • ISO_ARITH_MUL_DIV

        public static final Op ISO_ARITH_MUL_DIV
      • ISO_ARITH_POWER

        public static final Op ISO_ARITH_POWER
      • ISO_ARITH_DIVIDE

        public static final Op ISO_ARITH_DIVIDE
      • ISO_NEGATE

        public static final Op ISO_NEGATE
      • ISO_CLAUSES

        public static final Op ISO_CLAUSES
      • ISO_DIRECTIVES

        public static final Op ISO_DIRECTIVES
      • ISO_BITWISE_AND_OR

        public static final Op ISO_BITWISE_AND_OR
      • MODIFIERS

        public static final Op MODIFIERS
      • GNU_DIV_RDIV

        public static final Op GNU_DIV_RDIV
      • ISO_OR

        public static final Op ISO_OR
      • ISO_THEN

        public static final Op ISO_THEN
      • GNU_STAR_THEN

        public static final Op GNU_STAR_THEN
      • GNU_DOUBLE_DOT

        public static final Op GNU_DOUBLE_DOT
      • SICTUS_SPECIFIC

        public static final java.util.List<Op> SICTUS_SPECIFIC
      • ISO

        public static final java.util.List<Op> ISO
        Set of operators for ISO Prolog standard.
      • GNU_SPECIFIC

        public static final java.util.List<Op> GNU_SPECIFIC
        Set of operators is specific for GNU Prolog use.
      • SWI_SPECIFIC

        public static final java.util.List<Op> SWI_SPECIFIC
        Set of operators is specific for SWI Prolog use.
      • SWI

        public static final java.util.List<Op> SWI
        Set of operators for SWI Prolog.
      • GNU_FD

        public static final java.util.List<Op> GNU_FD
        Set of Finite Domain operators for GNU Prolog.
      • GNU

        public static final java.util.List<Op> GNU
        Set of operators for GNU Prolog.
      • SWI_CPL

        public static final java.util.List<Op> SWI_CPL
        Set of Constraint Logic Programming operators for SWI Prolog.
      • VIRTUAL_OPERATOR_BLOCK

        public static final Op VIRTUAL_OPERATOR_BLOCK
      • VIRTUAL_OPERATOR_CURLY_BLOCK

        public static final Op VIRTUAL_OPERATOR_CURLY_BLOCK
      • METAOPERATOR_COMMA

        public static final Op METAOPERATOR_COMMA
      • METAOPERATOR_LEFT_BRACKET

        public static final Op METAOPERATOR_LEFT_BRACKET
      • METAOPERATOR_LEFT_CURLY_BRACKET

        public static final Op METAOPERATOR_LEFT_CURLY_BRACKET
      • METAOPERATOR_RIGHT_BRACKET

        public static final Op METAOPERATOR_RIGHT_BRACKET
      • METAOPERATOR_RIGHT_CURLY_BRACKET

        public static final Op METAOPERATOR_RIGHT_CURLY_BRACKET
      • METAOPERATOR_LEFT_SQUARE_BRACKET

        public static final Op METAOPERATOR_LEFT_SQUARE_BRACKET
      • METAOPERATOR_RIGHT_SQUARE_BRACKET

        public static final Op METAOPERATOR_RIGHT_SQUARE_BRACKET
      • METAOPERATOR_DOT

        public static final Op METAOPERATOR_DOT
      • METAOPERATOR_VERTICAL_BAR

        public static final Op METAOPERATOR_VERTICAL_BAR
      • opAssoc

        private final OpAssoc opAssoc
      • precedence

        private final int precedence
      • preparedHash

        private final int preparedHash
      • multiNames

        private final java.lang.String[] multiNames
    • Constructor Detail

      • Op

        private Op​(int precedence,
                   OpAssoc type,
                   java.lang.String name,
                   java.lang.String[] multiNames)
    • Method Detail

      • assertOpValidOpName

        private static java.lang.String[] assertOpValidOpName​(java.lang.String[] names)
      • assertOpValidOpName

        private static java.lang.String assertOpValidOpName​(java.lang.String name)
      • make

        public static Op make​(int precedence,
                              OpAssoc type,
                              java.lang.String... names)
        Make operator descriptor describing bunch of operators with same characteristics but differently named.
        Parameters:
        precedence - the precedence
        type - the type of operators
        names - names of operators, must not be empty or contain null
        Returns:
        generated operator descriptor
        See Also:
        OpAssoc
      • makeSystem

        public static Op makeSystem​(int precedence,
                                    OpAssoc type,
                                    java.lang.String... names)
      • join

        @SafeVarargs
        public static java.util.List<Op> join​(java.util.List<Op>... args)
      • add

        public static Op[] add​(Op[] args,
                               Op... ops)
      • isMultiName

        public boolean isMultiName()
      • streamOp

        public java.util.stream.Stream<Op> streamOp()
      • getArity

        public int getArity()
        Description copied from class: PrologTerm
        Arity of element.
        Overrides:
        getArity in class PrologTerm
        Returns:
        arity of element, make sense for compound terms, for primitive terms is 1
      • getType

        public TermType getType()
        Description copied from class: PrologTerm
        Get term type.
        Specified by:
        getType in class PrologTerm
        Returns:
        term type, must not be null
      • getAssoc

        public OpAssoc getAssoc()
      • getPrecedence

        public int getPrecedence()
        Description copied from class: PrologTerm
        Get precedence of the term.
        Overrides:
        getPrecedence in class PrologTerm
        Returns:
        precedence, must not be negative
      • isCompatibleWith

        public boolean isCompatibleWith​(PrologStruct struct)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • readResolve

        private java.lang.Object readResolve()