Package io.cucumber.cucumberexpressions
Record Class NumberParser.DecimalFormatParser
java.lang.Object
java.lang.Record
io.cucumber.cucumberexpressions.NumberParser.DecimalFormatParser
- All Implemented Interfaces:
NumberParser
- Enclosing interface:
NumberParser
public static record NumberParser.DecimalFormatParser(DecimalFormatSymbols symbols, NumberFormat numberFormat)
extends Record
implements NumberParser
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.cucumber.cucumberexpressions.NumberParser
NumberParser.DecimalFormatParser, NumberParser.FallbackParser -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NumberFormatThe field for thenumberFormatrecord component.private final DecimalFormatSymbolsThe field for thesymbolsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDecimalFormatParser(DecimalFormatSymbols symbols, NumberFormat numberFormat) Creates an instance of aDecimalFormatParserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenumberFormatrecord component.private Numberdoubleprivate intfloatparseFloat(String s) private BigDecimalsymbols()Returns the value of thesymbolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
symbols
The field for thesymbolsrecord component. -
numberFormat
The field for thenumberFormatrecord component.
-
-
Constructor Details
-
DecimalFormatParser
Creates an instance of aDecimalFormatParserrecord class.- Parameters:
symbols- the value for thesymbolsrecord componentnumberFormat- the value for thenumberFormatrecord component
-
-
Method Details
-
parseDouble
- Specified by:
parseDoublein interfaceNumberParser
-
parseFloat
- Specified by:
parseFloatin interfaceNumberParser
-
parseBigDecimal
- Specified by:
parseBigDecimalin interfaceNumberParser
-
parse
-
parseSignificant
- Throws:
ParseException
-
parseExponent
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
symbols
Returns the value of thesymbolsrecord component.- Returns:
- the value of the
symbolsrecord component
-
numberFormat
Returns the value of thenumberFormatrecord component.- Returns:
- the value of the
numberFormatrecord component
-