Class BigDecimalParam
java.lang.Object
org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue<BigDecimalType,BigDecimal>
org.evomaster.client.java.controller.problem.rpc.schema.params.BigDecimalParam
- All Implemented Interfaces:
NumericConstraintBase<BigDecimal>
public class BigDecimalParam
extends NamedTypedValue<BigDecimalType,BigDecimal>
implements NumericConstraintBase<BigDecimal>
-
Field Summary
Fields inherited from class org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue
accessibleSchema, mapperAllowUnkownFields, objectMaper -
Constructor Summary
ConstructorsConstructorDescriptionBigDecimalParam(String name, AccessibleSchema accessibleSchema, JavaDtoSpec spec) BigDecimalParam(String name, BigDecimalType type, AccessibleSchema accessibleSchema) -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.evomaster.client.java.controller.api.dto.problem.rpc.ParamDtogetDto()get its dto format in order to further handle it with evomastr coregetMax()booleangetMin()booleangetScale()getValueAsJavaString(boolean isJava) newAssertionWithJavaOrKotlin(int indent, String responseVarName, int maxAssertionForDataInCollection, boolean isJava) create assertions with java for responsenewInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable) create instances with JavavoidsetMax(BigDecimal max) voidsetMaxInclusive(boolean inclusive) voidsetMin(BigDecimal min) voidsetMinInclusive(boolean inclusive) voidsetPrecision(Integer precision) voidvoidsetValueBasedOnDto(org.evomaster.client.java.controller.api.dto.problem.rpc.ParamDto dto) set value based on dto the value is basically obtained from evomaster corevoidset value based on jsonprotected voidsetValueBasedOnValidInstance(Object instance) set the value of the param based on instance compared with [setValueBasedOnInstance], the type of the instance here is evaluated as validMethods inherited from class org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue
copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, isHasDependentCandidates, isMutable, isNullable, isValidInstance, newAssertionWithJavaOrKotlin, newInstanceWithJavaOrKotlin, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.evomaster.client.java.controller.problem.rpc.schema.params.NumericConstraintBase
handleConstraintsInCopy, handleConstraintsInCopyDto
-
Constructor Details
-
BigDecimalParam
-
BigDecimalParam
-
-
Method Details
-
newInstance
- Specified by:
newInstancein classNamedTypedValue<BigDecimalType,BigDecimal> - Throws:
ClassNotFoundException
-
copyStructure
- Specified by:
copyStructurein classNamedTypedValue<BigDecimalType,BigDecimal>
-
copyProperties
- Overrides:
copyPropertiesin classNamedTypedValue<BigDecimalType,BigDecimal>
-
setValueBasedOnDto
public void setValueBasedOnDto(org.evomaster.client.java.controller.api.dto.problem.rpc.ParamDto dto) Description copied from class:NamedTypedValueset value based on dto the value is basically obtained from evomaster core- Specified by:
setValueBasedOnDtoin classNamedTypedValue<BigDecimalType,BigDecimal> - Parameters:
dto- contains value info with string
-
setValueBasedOnInstanceOrJson
public void setValueBasedOnInstanceOrJson(Object json) throws com.fasterxml.jackson.core.JsonProcessingException Description copied from class:NamedTypedValueset value based on json- Overrides:
setValueBasedOnInstanceOrJsonin classNamedTypedValue<BigDecimalType,BigDecimal> - Parameters:
json- contains value info with json format- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
setValueBasedOnValidInstance
Description copied from class:NamedTypedValueset the value of the param based on instance compared with [setValueBasedOnInstance], the type of the instance here is evaluated as valid- Specified by:
setValueBasedOnValidInstancein classNamedTypedValue<BigDecimalType,BigDecimal> - Parameters:
instance- is the instance
-
newInstanceWithJavaOrKotlin
public List<String> newInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable) Description copied from class:NamedTypedValuecreate instances with Java- Specified by:
newInstanceWithJavaOrKotlinin classNamedTypedValue<BigDecimalType,BigDecimal> - Parameters:
isDeclaration- specifies whether it is used to declare the instance (ie, with type name).doesIncludeName- specifies whether it is required to have the variable name eg, if true, var = new instance(); if yes, new instance();variableName- specifies the name of variableindent- specifies the indent of this block of the code- Returns:
- a list of string which could create instance with java
-
newAssertionWithJavaOrKotlin
public List<String> newAssertionWithJavaOrKotlin(int indent, String responseVarName, int maxAssertionForDataInCollection, boolean isJava) Description copied from class:NamedTypedValuecreate assertions with java for response- Specified by:
newAssertionWithJavaOrKotlinin classNamedTypedValue<BigDecimalType,BigDecimal> - Parameters:
indent- specifies the current indent of the coderesponseVarName- a variable name for responses- Returns:
- a list of string for assertions
-
getDto
public org.evomaster.client.java.controller.api.dto.problem.rpc.ParamDto getDto()Description copied from class:NamedTypedValueget its dto format in order to further handle it with evomastr core- Overrides:
getDtoin classNamedTypedValue<BigDecimalType,BigDecimal> - Returns:
- its corresponding dto
-
getValueAsJavaString
- Specified by:
getValueAsJavaStringin classNamedTypedValue<BigDecimalType,BigDecimal> - Returns:
- a string which could representing the value of the param with java eg, float 4.2 could be 4.2f
-
getMin
- Specified by:
getMinin interfaceNumericConstraintBase<BigDecimal>
-
setMin
- Specified by:
setMinin interfaceNumericConstraintBase<BigDecimal>
-
getMax
- Specified by:
getMaxin interfaceNumericConstraintBase<BigDecimal>
-
setMax
- Specified by:
setMaxin interfaceNumericConstraintBase<BigDecimal>
-
getMinInclusive
public boolean getMinInclusive()- Specified by:
getMinInclusivein interfaceNumericConstraintBase<BigDecimal>
-
setMinInclusive
public void setMinInclusive(boolean inclusive) - Specified by:
setMinInclusivein interfaceNumericConstraintBase<BigDecimal>
-
getMaxInclusive
public boolean getMaxInclusive()- Specified by:
getMaxInclusivein interfaceNumericConstraintBase<BigDecimal>
-
setMaxInclusive
public void setMaxInclusive(boolean inclusive) - Specified by:
setMaxInclusivein interfaceNumericConstraintBase<BigDecimal>
-
getPrecision
- Specified by:
getPrecisionin interfaceNumericConstraintBase<BigDecimal>
-
setPrecision
- Specified by:
setPrecisionin interfaceNumericConstraintBase<BigDecimal>
-
getScale
- Specified by:
getScalein interfaceNumericConstraintBase<BigDecimal>
-
setScale
- Specified by:
setScalein interfaceNumericConstraintBase<BigDecimal>
-
referenceTypes
- Specified by:
referenceTypesin classNamedTypedValue<BigDecimalType,BigDecimal>
-