Class IIRVTermUtils


  • public final class IIRVTermUtils
    extends Object
    Utilities class for IIRVVectorTerm subclasses.
    Since:
    13.0
    Author:
    Nick LaFarge
    • Method Detail

      • addPadding

        public static String addPadding​(String string,
                                        char c,
                                        int size,
                                        boolean addPaddingToLeft)
        Add padding characters to a string.
        Parameters:
        string - string to pad
        c - padding character
        size - desired size
        addPaddingToLeft - if true, the resulting string is right justified (i.e. the padding character is added to the left of the string)
        Returns:
        padded String
      • iirvTermsToLineString

        public static String iirvTermsToLineString​(IIRVVectorTerm<?>... terms)
        Converts a list of IIRVVectorTerm instances to a String for a single line of an IIRVVector.
        Parameters:
        terms - terms to parse/convert
        Returns:
        String containing each of the inputted terms
      • iirvTermsToLineStringSplitByTerm

        public static String iirvTermsToLineStringSplitByTerm​(String delimiter,
                                                              IIRVVectorTerm<?>... terms)
        Converts a list of IIRVVectorTerm instances to a String for a single line of an IIRVVector, where each term in the line is split by a specified delimiter.

        For real IIRV vector, the deliminator is always empty; it is only used when creating human-readable forms to more readily identify specific terms within a given message.

        Parameters:
        delimiter - delimiter to insert between each IIRV vector term
        terms - terms to parse/convert
        Returns:
        String containing each of the inputted terms