Operator

class Operator: Comparable<Operator>, TermConvertible, Any

Class representing a logic operator

Fields

Name Description
val functor: String
val specifier: Specifier
val priority: Int

Constructors

<init>

constructor(functor: String, specifier: Specifier, priority: Int)

Class representing a logic operator

Parameters

Name Description
functor: String
specifier: Specifier
priority: Int

Methods

compareTo

fun compareTo(other: Operator): Int

Parameters

Name Description
other: Operator

ReturnValue

Name Description
Int

toTerm

fun toTerm(): Struct

Converts this instance to a Prolog Term

ReturnValue

Name Description
Struct

equals

fun equals(other: Any?): Boolean

Parameters

Name Description
other: Any?

ReturnValue

Name Description
Boolean

hashCode

fun hashCode(): Int

ReturnValue

Name Description
Int

toString

fun toString(): String

ReturnValue

Name Description
String

CompanionObject

Operator

class Operator: Comparable<Operator>, TermConvertible, Any

Class representing a logic operator

Fields

Name Description
const FUNCTOR: String

The Operator functor

val TEMPLATE: Struct

An operator template

Methods

fromTerms

fun fromTerms(priority: Integer, specifier: Atom, functor: Atom): Operator?

Parameters

Name Description
priority: Integer
specifier: Atom
functor: Atom

ReturnValue

Name Description
Operator?

fromTerm

fun fromTerm(struct: Struct): Operator?

Creates an Operator instance from a well-formed Struct, or returns null if it cannot be interpreted as Operator

Parameters

Name Description
struct: Struct

ReturnValue

Name Description
Operator?