Class LongValuedIIRVTerm

java.lang.Object
org.orekit.files.iirv.terms.base.IIRVVectorTerm<Long>
org.orekit.files.iirv.terms.base.LongValuedIIRVTerm
All Implemented Interfaces:
Comparable<IIRVVectorTerm<?>>
Direct Known Subclasses:
CheckSumTerm, CoordinateSystemTerm, DataSourceTerm, DayOfYearTerm, MessageClassTerm, MessageIDTerm, PositionVectorComponentTerm, SequenceNumberTerm, SupportIdCodeTerm, VectorTypeTerm, VehicleIdCodeTerm

public class LongValuedIIRVTerm extends IIRVVectorTerm<Long>
Term in an IIRV Vector representing a Long (or integer) value.
Since:
13.0
Author:
Nick LaFarge
  • Constructor Details

    • LongValuedIIRVTerm

      public LongValuedIIRVTerm(String pattern, long value, int length, boolean isSigned)
      Constructs an IIRV Vector Term represented by a long. This representation is used for any numeric terms in the IIRV Vector that do not contain a decimal point.
      Parameters:
      pattern - Regular expression pattern that validates the term
      value - Value of the term, expressed as a long
      length - LengthC of the term, measured in number of characters in the String representation
      isSigned - True if negative values are permitted, false if the value is positive
    • LongValuedIIRVTerm

      public LongValuedIIRVTerm(String pattern, String value, int length, boolean isSigned)
      Constructs an IIRV Vector Term represented by a Long. This representation is used for any numeric terms in the IIRV Vector that do not 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
      isSigned - True if negative values are permitted, false if the value is positive
  • Method Details

    • computeValueFromString

      public static long computeValueFromString(String value)
      Parses a string as a long, removing any leading spaces.
      Parameters:
      value - String value of the term.
      Returns:
      the long represented by the argument
    • toEncodedString

      public String toEncodedString(Long 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<Long>
      Parameters:
      termValue - Value of the term
      Returns:
      Encoded String representing of the inputted IIRV term it appears in the IIRV message
    • toInt

      public int toInt()
      Convert the underlying IIRVVectorTerm.value() from long to int.
      Returns:
      The value of the term as an int
    • validateNumericValue

      protected void validateNumericValue(long value)
      Validate a given numerical value to ensure it is not greater than the maximum possible accuracy of this term, and that it does not contain a negative value for a positive term (when isSigned is false).
      Parameters:
      value - long value of this term