Expected

class Expected: ToTermConvertible, Any

A class describing the expected type whose absence caused the error

Methods

toTerm

fun toTerm(): Atom

A function to transform the type to corresponding Atom representation

ReturnValue

Name Description
Atom

toString

fun toString(): String

ReturnValue

Name Description
String

CompanionObject

Expected

class Expected: ToTermConvertible, Any

A class describing the expected type whose absence caused the error

Fields

Name Description
val CALLABLE: by lazy { predefinedNameToInstance.getValue("callable") }
val ATOM: by lazy { predefinedNameToInstance.getValue("atom") }
val INTEGER: by lazy { predefinedNameToInstance.getValue("integer") }
val NUMBER: by lazy { predefinedNameToInstance.getValue("number") }
val PREDICATE_INDICATOR: by lazy { predefinedNameToInstance.getValue("predicate_indicator") }
val COMPOUND: by lazy { predefinedNameToInstance.getValue("compound") }
val LIST: by lazy { predefinedNameToInstance.getValue("list") }
val CHARACTER: by lazy { predefinedNameToInstance.getValue("character") }
val EVALUABLE: by lazy { predefinedNameToInstance.getValue("evaluable") }

Methods

of

fun of(type: String): Expected

Returns the Expected instance described by type; creates a new instance only if type was not predefined

Parameters

Name Description
type: String

ReturnValue

Name Description
Expected

fromTerm

fun fromTerm(term: Term): Expected?

Gets Expected instance from term representation, if possible

Parameters

Name Description
term: Term

ReturnValue

Name Description
Expected?