Term class abstract
Base class for all Prolog terms.
Terms are immutable data structures representing Prolog values. The term hierarchy includes:
- Variable: Logic variables (e.g., X, Y, _)
- Atom: Atomic constants (e.g., foo, 'Hello World')
- PrologInteger: Integer numbers (e.g., 42, -17)
- PrologFloat: Floating-point numbers (e.g., 3.14, -2.5)
- Compound: Compound terms/structures (e.g., f(a,b),
1,2,3)
- Implementers
Constructors
- Term()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isAtom → bool
-
Returns true if this term is an atom.
no setter
- isAtomic → bool
-
Returns true if this term is atomic (atom or number).
no setter
- isCallable → bool
-
Returns true if this term is callable (atom or compound).
no setter
- isCompound → bool
-
Returns true if this term is a compound term.
no setter
- isFloat → bool
-
Returns true if this term is a float.
no setter
- isGround → bool
-
Returns true if this term is ground (contains no unbound variables).
no setter
- isInteger → bool
-
Returns true if this term is an integer.
no setter
- isList → bool
-
Returns true if this term is a list (including empty list).
no setter
- isNil → bool
-
Returns true if this term is the empty list [].
no setter
- isNumber → bool
-
Returns true if this term is a number (integer or float).
no setter
- isVariable → bool
-
Returns true if this term is a variable.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override