Signature

data class Signature: TermConvertible, Any

The signature of a query Struct or a Primitive

Fields

Name Description
val name: String
val arity: Int
val vararg: Boolean

Constructors

<init>

constructor(name: String, arity: Int, vararg: Boolean)

The signature of a query Struct or a Primitive

Parameters

Name Description
name: String
arity: Int
vararg: Boolean

Methods

toTerm

fun toTerm(): Struct

Converts this signature to a Struct '/'([name], [arity]) or '/'([name],'+'([arity], vararg))

ReturnValue

Name Description
Struct

toIndicator

fun toIndicator(): Indicator

Converts this Signature to Indicator, if possible without loosing information, otherwise throws an exception

ReturnValue

Name Description
Indicator

withArgs

infix fun withArgs(arguments: Iterable<Term>): Struct

Creates corresponding Struct of this Signature with provided arguments

Parameters

Name Description
arguments: Iterable<Term>

ReturnValue

Name Description
Struct

CompanionObject

Signature

data class Signature: TermConvertible, Any

The signature of a query Struct or a Primitive

Fields

Name Description
const FUNCTOR: String

The functor of a Signature struct

Methods

fromSignatureTerm

fun fromSignatureTerm(term: Struct): Signature?

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

Parameters

Name Description
term: Struct

ReturnValue

Name Description
Signature?

fromSignatureTerm

fun fromSignatureTerm(term: Term): Signature?

Creates a Signature instance from a well-formed Signature Term, or returns null if it cannot be interpreted as Signature

Parameters

Name Description
term: Term

ReturnValue

Name Description
Signature?

fromIndicator

fun fromIndicator(indicator: Indicator): Signature?

Creates a Signature instance from a well-formed Indicator, or returns null if it wasn't

Parameters

Name Description
indicator: Indicator

ReturnValue

Name Description
Signature?