Class DoubleValuedIIRVTerm

    • Constructor Detail

      • DoubleValuedIIRVTerm

        public DoubleValuedIIRVTerm​(String pattern,
                                    double value,
                                    int length,
                                    int nCharsAfterDecimalPlace,
                                    boolean isSigned)
        Constructs an IIRV Vector Term represented by a double. This representation is used for any numeric terms in the IIRV Vector that contain a decimal point.
        Parameters:
        pattern - Regular expression pattern that validates the term
        value - Value of the term, expressed as a double
        length - Length of the term, measured in number of characters in the String representation
        nCharsAfterDecimalPlace - Number of characters before the end of the encoded String the decimal place is assumed to occur.
        isSigned - True if negative values are permitted, false if the value is positive
      • DoubleValuedIIRVTerm

        public DoubleValuedIIRVTerm​(String pattern,
                                    String value,
                                    int length,
                                    int nCharsAfterDecimalPlace,
                                    boolean isSigned)
        Constructs an IIRV Vector Term represented by a double from a given String. This representation is used for any numeric terms in the IIRV Vector that contain a decimal point.
        Parameters:
        pattern - Regular expression pattern that validates the term
        value - Value of the term, expressed as a String
        length - Length of the term, measured in number of characters in the String representation
        nCharsAfterDecimalPlace - Number of characters before the end of value the decimal place is assumed to occur.
        isSigned - True if negative values are permitted, false if the value is positive
    • Method Detail

      • computeValueFromString

        public static double computeValueFromString​(String value,
                                                    int nCharsAfterDecimalPlace)
        Compute the double value of the term from a given String.
        Parameters:
        value - String value to convert to a double
        nCharsAfterDecimalPlace - Number of characters before the end of value the decimal place is assumed to occur.
        Returns:
        Double value corresponding to the value String argument
      • toEncodedString

        public String toEncodedString​(Double termValue)
        Convert an IIRV term value into the encoded String representation, as it would appear in the IIRV message.
        Specified by:
        toEncodedString in class IIRVVectorTerm<Double>
        Parameters:
        termValue - Value of the term
        Returns:
        Encoded String representing of the inputted IIRV term it appears in the IIRV message