Class AmexMessage

java.lang.Object
cl.netswitch.iso.amex8583.AmexMessage
All Implemented Interfaces:
Serializable

public abstract class AmexMessage extends Object implements Serializable
Methods common (shared) by all AMEX messages.
See Also:
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    final void
    copyFrom(Object source)
    Calls all setters in this message with values obtain from matching getters in a source object.
    final void
    copyTo(Object destin)
    Calls all setters in a destination object with values obtain from matching getters in this message.
    final long
    Returns the primary bitmap of this message (DE-1,Format=b-8).
    final Short
    Returns the Message Type Identification (DE-0,Format=n-4).
    final void
    Changes the Message Type Identification (DE-0,Format=n-4).
    protected final void
    updateBitmap(int index, Object value)
    Updates the bitmap of this message adding or removing a field index.

    Methods inherited from class java.lang.Object

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

    • AmexMessage

      public AmexMessage()
      Constructs a new AmexMessage instance.
  • Method Details

    • getMti

      public final Short getMti()
      Returns the Message Type Identification (DE-0,Format=n-4).
      Returns:
      the Message Type Identification (DE-0,Format=n-4).
    • setMti

      public final void setMti(Short mti)
      Changes the Message Type Identification (DE-0,Format=n-4).
      Parameters:
      mti - the new value of the field (can be null).
    • getBitmap

      public final long getBitmap()
      Returns the primary bitmap of this message (DE-1,Format=b-8).
      Returns:
      the primary bitmap of this message (DE-1,Format=b-8).
    • updateBitmap

      protected final void updateBitmap(int index, Object value)
      Updates the bitmap of this message adding or removing a field index.
      Parameters:
      index - the index of the field to add or remove in bitmap.
      value - add index if this value is not null, else remove index.
      Throws:
      IndexOutOfBoundsException - if index is out-of-bounds.
    • copyFrom

      public final void copyFrom(Object source)
      Calls all setters in this message with values obtain from matching getters in a source object.

      In other words, this method executes the following statement for all matching getters and setters.

       this.setProperty(source.getProperty());
      A getter and setter match if the name and type of their respective properties are exactly the same.
      Parameters:
      source - the object whose getter methods are invoked.
      Throws:
      NullPointerException - if source if null.
      IllegalArgumentException - if another error occurs.
      See Also:
    • copyTo

      public final void copyTo(Object destin)
      Calls all setters in a destination object with values obtain from matching getters in this message.

      In other words, this method executes the following statement for all matching getters and setters.

       destin.setProperty(this.getProperty());
      A getter and setter match if the name and type of their respective properties are exactly the same.
      Parameters:
      destin - the object whose setter methods are invoked.
      Throws:
      NullPointerException - if target if null.
      IllegalArgumentException - if another error occurs.
      See Also: