Package org.orekit.files.iirv.terms.base
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 Summary
Constructors Constructor Description LongValuedIIRVTerm(String pattern, long value, int length, boolean isSigned)Constructs an IIRV Vector Term represented by a long.LongValuedIIRVTerm(String pattern, String value, int length, boolean isSigned)Constructs an IIRV Vector Term represented by a Long.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longcomputeValueFromString(String value)Parses a string as a long, removing any leading spaces.StringtoEncodedString(Long termValue)Convert an IIRV term value into the encoded String representation, as it would appear in the IIRV message.inttoInt()Convert the underlyingIIRVVectorTerm.value()from long to int.protected voidvalidateNumericValue(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 (whenisSignedis false).-
Methods inherited from class org.orekit.files.iirv.terms.base.IIRVVectorTerm
compareTo, equals, hashCode, length, toEncodedString, validateString, value
-
-
-
-
Constructor Detail
-
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 termvalue- Value of the term, expressed as a longlength- LengthC of the term, measured in number of characters in the String representationisSigned- 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 termvalue- Value of the term, expressed as a Stringlength- Length of the term, measured in number of characters in the String representationisSigned- True if negative values are permitted, false if the value is positive
-
-
Method Detail
-
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:
toEncodedStringin classIIRVVectorTerm<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 underlyingIIRVVectorTerm.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 (whenisSignedis false).- Parameters:
value- long value of this term
-
-