java.lang.Object
cl.netswitch.iso.iso8583.IsoTlvElements
- All Implemented Interfaces:
Serializable
Elements encoded in TLV (Tag-Length-Value) format.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes all defined subelements.getElement
(int id) Returns the value of the subelement indexed by specifiedid
.int
Returns the number of subelements defined.int
getTcc()
Returns the value of the Transaction Category Code (TCC).boolean
hasElement
(int id) Returnstrue
if the subelement indexed byid
is defined.void
removeElement
(int id) Removes the subelement indexed by specifiedid
.void
setElement
(int id, String value) Changes the value of the subelement indexed by specifiedid
.void
setTcc
(int tcc) Changes the value of the Transaction Category Code (TCC).
-
Constructor Details
-
IsoTlvElements
public IsoTlvElements()Constructs a newIsoTlvElements
instance.
-
-
Method Details
-
getTcc
public int getTcc()Returns the value of the Transaction Category Code (TCC).- Returns:
- the value of the Transaction Category Code (TCC).
-
setTcc
public void setTcc(int tcc) Changes the value of the Transaction Category Code (TCC).- Parameters:
tcc
- the new value of Transaction Category Code (TCC).- Throws:
IllegalArgumentException
- iftcc
is invalid.
-
getElementCount
public int getElementCount()Returns the number of subelements defined.- Returns:
- the number of subelements defined.
-
hasElement
public boolean hasElement(int id) Returnstrue
if the subelement indexed byid
is defined.- Parameters:
id
- the identification of the subelement.- Returns:
true
if the subelement indexed by ID is defined.- Throws:
IndexOutOfBoundsException
- ifid
is out-of-bounds.
-
getElement
Returns the value of the subelement indexed by specifiedid
.- Parameters:
id
- the identification of the required subelement.- Returns:
- the value or
null
if subelement is not defined. - Throws:
IndexOutOfBoundsException
- ifid
is out-of-bounds.
-
setElement
Changes the value of the subelement indexed by specifiedid
. Ifvalue
isnull
the subelement is removed from the table.- Parameters:
id
- the identification of the subelement.value
- the new value of the subelement (can be null).- Throws:
IndexOutOfBoundsException
- ifid
is out-of-bounds.
-
removeElement
public void removeElement(int id) Removes the subelement indexed by specifiedid
.- Parameters:
id
- the identification of the subelement.- Throws:
IndexOutOfBoundsException
- ifid
is out-of-bounds.
-
clearElements
public void clearElements()Removes all defined subelements.
-