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 protected
IIRVVectorTerm(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 int
compareTo(IIRVVectorTerm<?> o)
boolean
equals(Object o)
int
hashCode()
int
length()
Gets the length of the term.String
toEncodedString()
Converts the storedvalue
of the IIRV term into the encoded String representation, as it would appear in the IIRV message.abstract String
toEncodedString(T termValue)
Convert an IIRV term value into the encoded String representation, as it would appear in the IIRV message.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.T
value()
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 storedvalue
of 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:
compareTo
in 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
-
-