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

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    int
    int
    Gets the length of the term.
    Converts the stored value 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.
    Gets the value of the term in the IIRV vector.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 term
      value - Value of the term
      length - Length of the term, measured in number of characters in the String representation
  • Method Details

    • 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 stored value 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 interface Comparable<T>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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 by toEncodedString(T).

      Returns:
      Length of the term