Class JavaLiteralFloat
java.lang.Object
io.github.mmm.code.base.item.BaseItem
io.github.mmm.code.base.expression.BaseExpression
io.github.mmm.code.impl.java.expression.constant.JavaConstant<Float>
io.github.mmm.code.impl.java.expression.literal.JavaLiteral<Float>
io.github.mmm.code.impl.java.expression.literal.JavaLiteralFloat
- All Implemented Interfaces:
io.github.mmm.code.api.expression.CodeConstant,io.github.mmm.code.api.expression.CodeExpression,io.github.mmm.code.api.expression.CodeLiteral,io.github.mmm.code.api.item.CodeItem,JavaExpression
Implementation of
JavaLiteral for float literal.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JavaLiteralFloatJavaLiteralFloatfor0.static final JavaLiteralFloatJavaLiteralFloatfor1.static final JavaLiteralFloatJavaLiteralFloatforFloat#MAX_VALUE.static final JavaLiteralFloatJavaLiteralFloatforFloat#MIN_VALUE.Fields inherited from class io.github.mmm.code.impl.java.expression.constant.JavaConstant
valueFields inherited from interface io.github.mmm.code.api.item.CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Method Summary
Modifier and TypeMethodDescriptionstatic JavaLiteralFloatof(float value) static JavaLiteralFloatMethods inherited from class io.github.mmm.code.impl.java.expression.literal.JavaLiteral
evaluate, isPrimitive, ofMethods inherited from class io.github.mmm.code.impl.java.expression.constant.JavaConstant
doWrite, getValue, of, ofMethods inherited from class io.github.mmm.code.base.item.BaseItem
getOwningType, getSpaces, toString, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mmm.code.api.expression.CodeConstant
getValueMethods inherited from interface io.github.mmm.code.api.item.CodeItem
getLanguage, write, write, write, write, write, write
-
Field Details
-
VALUE_0
JavaLiteralFloatfor0. -
VALUE_1
JavaLiteralFloatfor1. -
VALUE_MIN
JavaLiteralFloatforFloat#MIN_VALUE. -
VALUE_MAX
JavaLiteralFloatforFloat#MAX_VALUE.
-
-
Method Details
-
withValue
- Specified by:
withValuein classJavaLiteral<Float>- Parameters:
newValue- the newvalue. May not benull.- Returns:
- the corresponding
JavaConstantof the same type with the given value.
-
getJavaClass
- Overrides:
getJavaClassin classJavaConstant<Float>- Returns:
- the
Classreflecting the type of this constant.
-
getSourceCode
- Specified by:
getSourceCodein interfaceio.github.mmm.code.api.item.CodeItem- Specified by:
getSourceCodein classJavaConstant<Float>
-
of
- Parameters:
value- the literal value.- Returns:
- the
CodeLiteralfor the givenvalue.
-
of
- Parameters:
value- the literal value. May not benull.- Returns:
- the
CodeLiteralfor the givenvalue.
-