Package org.orekit.files.iirv.terms.base
Class IIRVVectorTerm<T>
java.lang.Object
org.orekit.files.iirv.terms.base.IIRVVectorTerm<T>
- Type Parameters:
T- Type of object represented in the term (e.g. integer, long, double, String, ...)
- All Implemented Interfaces:
Comparable<IIRVVectorTerm<?>>
- Direct Known Subclasses:
ConstantValuedIIRVTerm,DoubleValuedIIRVTerm,LongValuedIIRVTerm,StringValuedIIRVTerm,VectorEpochTerm
Defines a term within an IIRV Vector, parameterized by its underlying data type.
- Since:
- 13.0
- Author:
- Nick LaFarge
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIIRVVectorTerm(String pattern, T value, int length) Constructs an IIRVVectorTerm with a given regular expression pattern, value, and length. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IIRVVectorTerm<?> o) booleaninthashCode()intlength()Gets the length of the term.Converts the storedvalueof the IIRV term into the encoded String representation, as it would appear in the IIRV message.abstract StringtoEncodedString(T termValue) Convert an IIRV term value into the encoded String representation, as it would appear in the IIRV message.protected voidvalidateString(String valueString) Validate a string value against the vector term, ensuring that it is the proper length and matches the specified regular expression pattern.value()Gets the value of the term in the IIRV vector.
-
Constructor Details
-
IIRVVectorTerm
Constructs an IIRVVectorTerm with a given regular expression pattern, value, and length.- Parameters:
pattern- Regular expression pattern that validates the termvalue- Value of the termlength- Length of the term, measured in number of characters in the String representation
-
-
Method Details
-
toEncodedString
Convert an IIRV term value into the encoded String representation, as it would appear in the IIRV message.- Parameters:
termValue- Value of the term- Returns:
- Encoded String representing of the inputted IIRV term it appears in the IIRV message
-
toEncodedString
Converts the storedvalueof the IIRV term into the encoded String representation, as it would appear in the IIRV message.- Returns:
- Encoded String representing of the value of the stored vector term, as it would appear in the IIRV message
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
equals
-
hashCode
public int hashCode() -
validateString
Validate a string value against the vector term, ensuring that it is the proper length and matches the specified regular expression pattern.- Parameters:
valueString- String to validate against the regular expression pattern
-
value
Gets the value of the term in the IIRV vector.- Returns:
- value of the term in the IIRV vector
-
length
public int length()Gets the length of the term.The length is measured in number characters contained in the encoded String representation of
value, as computed bytoEncodedString(T).- Returns:
- Length of the term
-