Class IIRVVectorTerm<T>

    • 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 term
        value - Value of the term
        length - 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 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
      • 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