Package org.jpos.tlv

Class CharTagMapBuilder


  • public class CharTagMapBuilder
    extends java.lang.Object
    Builder to create TLV/LTV tag maps stored as sequence of characters.

    Using withTagLengthSwap(true) while creating the builder causes switchs CharTagMap in LTV mode.

    • Constructor Detail

      • CharTagMapBuilder

        public CharTagMapBuilder()
        Constructs a new instance of the builder.
    • Method Detail

      • withLengthSize

        public CharTagMapBuilder withLengthSize​(int size)
        Sets size of length element.
        Parameters:
        size - size of length elament
        Returns:
        this, for chaining, not null
      • withTagSize

        public CharTagMapBuilder withTagSize​(int size)
        Sets size of tag element.
        Parameters:
        size - size of length elament
        Returns:
        this, for chaining, not null
      • withTagLengthSwap

        public CharTagMapBuilder withTagLengthSwap​(boolean swap)
        Swap Tag with Length.
        Parameters:
        swap - indicates if tag element will be swapped with length element
        Returns:
        this, for chaining, not null
      • build

        public CharTagMap build()
                         throws java.lang.IllegalArgumentException
        Completes this builder by creating the CharTagMap.
        Returns:
        the created tag map, not null
        Throws:
        java.lang.IllegalArgumentException - if tag ma cannot be created