Package org.jpos.tlv
Class CharTagMapBuilder
- java.lang.Object
-
- org.jpos.tlv.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 switchsCharTagMap
in LTV mode.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Integer
lengthSize
protected boolean
swapTagWithLength
protected java.lang.Integer
tagSize
-
Constructor Summary
Constructors Constructor Description CharTagMapBuilder()
Constructs a new instance of the builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharTagMap
build()
Completes this builder by creating theCharTagMap
.CharTagMapBuilder
withLengthSize(int size)
Sets size of length element.CharTagMapBuilder
withTagLengthSwap(boolean swap)
Swap Tag with Length.CharTagMapBuilder
withTagSize(int size)
Sets size of tag element.
-
-
-
Field Detail
-
tagSize
protected java.lang.Integer tagSize
-
lengthSize
protected java.lang.Integer lengthSize
-
swapTagWithLength
protected boolean swapTagWithLength
-
-
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 theCharTagMap
.- Returns:
- the created tag map, not
null
- Throws:
java.lang.IllegalArgumentException
- if tag ma cannot be created
-
-