Class PrologFloat
java.lang.Object
com.igormaznitsa.prologparser.terms.PrologTerm
com.igormaznitsa.prologparser.terms.PrologNumeric
com.igormaznitsa.prologparser.terms.PrologFloat
- All Implemented Interfaces:
Serializable, Comparable<PrologTerm>
Representation for float numeric term.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MathContextprivate static final longprivate final BigDecimalFields inherited from class PrologTerm
quotation, text -
Constructor Summary
ConstructorsConstructorDescriptionPrologFloat(double value) PrologFloat(double value, int line, int pos) PrologFloat(String text) PrologFloat(String text, int line, int pos) PrologFloat(BigDecimal value) PrologFloat(BigDecimal value, int line, int pos) -
Method Summary
Methods inherited from class PrologNumeric
getText, getTypeMethods inherited from class PrologTerm
assertNonEmptyString, compareTo, findQuotation, flatComma, getArity, getFunctor, getLine, getPos, getPrecedence, getQuotation, isAnyBlock, isBlock, isCurlyBlock, setLine, setPos, stream
-
Field Details
-
MATH_CONTEXT
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
value
-
-
Constructor Details
-
PrologFloat
-
PrologFloat
-
PrologFloat
public PrologFloat(double value) -
PrologFloat
public PrologFloat(double value, int line, int pos) -
PrologFloat
-
PrologFloat
-
-
Method Details
-
makeNeg
Description copied from class:PrologNumericMake negative representation of the numeric term- Specified by:
makeNegin classPrologNumeric- Returns:
- the negative variant of the numeric
-
getFloatValue
-
getNumber
Description copied from class:PrologNumericGet numeric representation of the saved number.- Specified by:
getNumberin classPrologNumeric- Returns:
- the saved number
-
toString
- Overrides:
toStringin classPrologTerm
-
isNegative
public boolean isNegative()Description copied from class:PrologNumericCheck that the number is negative one- Specified by:
isNegativein classPrologNumeric- Returns:
- true if the number is negative one, false otherwise
-