Class IsoTlvElements

java.lang.Object
cl.netswitch.iso.iso8583.IsoTlvElements
All Implemented Interfaces:
Serializable

public class IsoTlvElements extends Object implements Serializable
Elements encoded in TLV (Tag-Length-Value) format.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new IsoTlvElements instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all defined subelements.
    getElement(int id)
    Returns the value of the subelement indexed by specified id.
    int
    Returns the number of subelements defined.
    int
    Returns the value of the Transaction Category Code (TCC).
    boolean
    hasElement(int id)
    Returns true if the subelement indexed by id is defined.
    void
    removeElement(int id)
    Removes the subelement indexed by specified id.
    void
    setElement(int id, String value)
    Changes the value of the subelement indexed by specified id.
    void
    setTcc(int tcc)
    Changes the value of the Transaction Category Code (TCC).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IsoTlvElements

      public IsoTlvElements()
      Constructs a new IsoTlvElements 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 - if tcc is invalid.
    • getElementCount

      public int getElementCount()
      Returns the number of subelements defined.
      Returns:
      the number of subelements defined.
    • hasElement

      public boolean hasElement(int id)
      Returns true if the subelement indexed by id is defined.
      Parameters:
      id - the identification of the subelement.
      Returns:
      true if the subelement indexed by ID is defined.
      Throws:
      IndexOutOfBoundsException - if id is out-of-bounds.
    • getElement

      public String getElement(int id)
      Returns the value of the subelement indexed by specified id.
      Parameters:
      id - the identification of the required subelement.
      Returns:
      the value or null if subelement is not defined.
      Throws:
      IndexOutOfBoundsException - if id is out-of-bounds.
    • setElement

      public void setElement(int id, String value)
      Changes the value of the subelement indexed by specified id. If value is null 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 - if id is out-of-bounds.
    • removeElement

      public void removeElement(int id)
      Removes the subelement indexed by specified id.
      Parameters:
      id - the identification of the subelement.
      Throws:
      IndexOutOfBoundsException - if id is out-of-bounds.
    • clearElements

      public void clearElements()
      Removes all defined subelements.