Class AmexDecFL<M>

java.lang.Object
cl.netswitch.iso.amex8583.AmexField<M,BigDecimal>
cl.netswitch.iso.amex8583.AmexDecFL<M>
Type Parameters:
M - the type of the ISO message.

public class AmexDecFL<M> extends AmexField<M,BigDecimal>
Decimal Fixed-Length Right-Justified of N digits (1 ≤ N) and Scale S (0 ≤ S < N).
  • Constructor Details

    • AmexDecFL

      public AmexDecFL(int index, int length, String name)
      Constructs a new AmexDecFL instance with scale 0.
      Parameters:
      index - the index of this field.
      length - the number of elements of this field value.
      name - the name of this field.
      Throws:
      NullPointerException - if name is null.
      IllegalArgumentException - if an argument is invalid.
    • AmexDecFL

      public AmexDecFL(int index, int length, int scale, String name)
      Constructs a new AmexDecFL instance.
      Parameters:
      index - the index of this field.
      length - the number of elements of this field value.
      scale - the number of digits in the fractional part.
      name - the name of this field.
      Throws:
      NullPointerException - if name is null.
      IllegalArgumentException - if an argument is invalid.
  • Method Details

    • decodeValue

      public BigDecimal decodeValue(ByteBuffer buffer)
      Decodes the value of this field from the supplied byte buffer.
      Specified by:
      decodeValue in class AmexField<M,BigDecimal>
      Parameters:
      buffer - the buffer containing the encoded field value.
      Returns:
      the value decoded from supplied byte buffer.
      Throws:
      NullPointerException - if buffer is null.
      IsoException - if contents of buffer is invalid.
    • encodeValue

      public void encodeValue(BigDecimal value, cl.netswitch.lib.util.ByteArray barray)
      Encodes the value of this field into the supplied byte array.
      Specified by:
      encodeValue in class AmexField<M,BigDecimal>
      Parameters:
      value - the value to be encoded into byte array.
      barray - the byte array containing encoded field values.
      Throws:
      NullPointerException - if an argument is null.
      IsoException - if value is invalid.