Class IsoTlvElements
java.lang.Object
cl.netswitch.iso.iso8583.IsoTlvElements
- All Implemented Interfaces:
Serializable
Elements encoded in TLV (Tag-Length-Value) format.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves all defined subelements.getElement(int id) Returns the value of the subelement indexed by specifiedid.intReturns the number of subelements defined.intgetTcc()Returns the value of the Transaction Category Code (TCC).booleanhasElement(int id) Returnstrueif the subelement indexed byidis defined.voidremoveElement(int id) Removes the subelement indexed by specifiedid.voidsetElement(int id, String value) Changes the value of the subelement indexed by specifiedid.voidsetTcc(int tcc) Changes the value of the Transaction Category Code (TCC).
-
Constructor Details
-
IsoTlvElements
public IsoTlvElements()Constructs a newIsoTlvElementsinstance.
-
-
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- iftccis invalid.
-
getElementCount
public int getElementCount()Returns the number of subelements defined.- Returns:
- the number of subelements defined.
-
hasElement
public boolean hasElement(int id) Returnstrueif the subelement indexed byidis defined.- Parameters:
id- the identification of the subelement.- Returns:
trueif the subelement indexed by ID is defined.- Throws:
IndexOutOfBoundsException- ifidis 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
nullif subelement is not defined. - Throws:
IndexOutOfBoundsException- ifidis out-of-bounds.
-
setElement
Changes the value of the subelement indexed by specifiedid. Ifvalueisnullthe 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- ifidis out-of-bounds.
-
removeElement
public void removeElement(int id) Removes the subelement indexed by specifiedid.- Parameters:
id- the identification of the subelement.- Throws:
IndexOutOfBoundsException- ifidis out-of-bounds.
-
clearElements
public void clearElements()Removes all defined subelements.
-