public interface PrologNumber extends PrologTerm
Represent all Prolog number data type. Is an abstract class that contains all commons method related to number data types. In Prolog the number data types are Integer and Float. Some Prolog implementations have and extension for this legacy data types. They are Long (Large Integer Number) and Double (Double precision Floating Point Number). For Prolog implementations that no have support for Long and Double data types, they are implement this classes holding a Prolog integer for Long case and Prolog float for Double case.
Two Prolog integers numbers are equals if and only if they are integers number and have the same value.Two Prolog integers numbers unify if are equals or at least one PrologTerm is a free variable Two Prolog floats numbers are equals if and only if they are floats number and have the same value.Two Prolog floats numbers unify if are equals or at least one PrologTerm is a free variable Two Prolog longs numbers are equals if and only if they are longs number and have the same value.Two Prolog longs numbers unify if are equals or at least one PrologTerm is a free variable Two Prolog doubles numbers are equals if and only if they are doubles number and have the same value.Two Prolog doubles numbers unify if are equals or at least one PrologTerm is a free variable
Some Prolog implementations consider that integers and longs are equals if they have the same value and unify if have the same value or at least one PrologTerm is a free variable. Some Prolog implementations consider that floats and double are equals if they have the same value and unify if have the same value or at least one PrologTerm is a free variable.
Modifier and Type | Method and Description |
---|---|
double |
getDoubleValue()
Cast and return the equivalent Java Double Number value from current Prolog
Number.
|
float |
getFloatValue()
Cast and return the equivalent Java Float Number value from current Prolog
Number.
|
int |
getIntegerValue()
Cast and return the equivalent Java Integer Number value from current Prolog
Number.
|
long |
getLongValue()
Cast and return the equivalent Java Long Number value from current Prolog
Number.
|
PrologDouble |
getPrologDouble()
Cast and return the equivalent Prolog Double Number from current Prolog
Number.
|
PrologFloat |
getPrologFloat()
Cast and return the equivalent Prolog Float Number from current Prolog
Number.
|
PrologInteger |
getPrologInteger()
Cast and return the equivalent Prolog Integer Number from current Prolog
Number.
|
PrologLong |
getPrologLong()
Cast and return the equivalent Prolog Long Number from current Prolog Number.
|
cast, getArgument, getArguments, getArity, getFunctor, getIndicator, getObject, getProvider, getTerm, getType, hasIndicator, isAtom, isAtomic, isClass, isCompound, isDouble, isEmptyList, isEntry, isEvaluable, isFalseType, isField, isFloat, isInteger, isList, isLong, isMap, isMixin, isNil, isNullType, isNumber, isObjectType, isParameter, isReference, isResult, isStructure, isTrueType, isVariable, isVariableBound, isVariableNotBound, isVoidType, match, unify
compareTo
isClause, isTerm
int getIntegerValue()
long getLongValue()
float getFloatValue()
double getDoubleValue()
PrologFloat getPrologFloat()
PrologInteger getPrologInteger()
PrologDouble getPrologDouble()
PrologLong getPrologLong()
Copyright © 2020–2024 Prolobjectlink Project. All rights reserved.