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
public abstract class IIRVVectorTerm<T> extends Object implements Comparable<IIRVVectorTerm<?>>
Defines a term within an IIRV Vector, parameterized by its underlying data type.- Since:
- 13.0
- Author:
- Nick LaFarge
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIIRVVectorTerm(String pattern, T value, int length)Constructs an IIRVVectorTerm with a given regular expression pattern, value, and length.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(IIRVVectorTerm<?> o)booleanequals(Object o)inthashCode()intlength()Gets the length of the term.StringtoEncodedString()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.Tvalue()Gets the value of the term in the IIRV vector.
-
-
-
Constructor Detail
-
IIRVVectorTerm
protected IIRVVectorTerm(String pattern, T value, int length)
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 Detail
-
toEncodedString
public abstract String toEncodedString(T termValue)
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
public String 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
public int compareTo(IIRVVectorTerm<?> o)
- Specified by:
compareToin interfaceComparable<T>
-
validateString
protected void validateString(String valueString)
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
public T 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
-
-