Class MurMessageComparator

  • All Implemented Interfaces:
    java.util.Comparator<SwiftMessage>

    public class MurMessageComparator
    extends java.lang.Object
    implements java.util.Comparator<SwiftMessage>
    Compares the messages based on the MUR.

    The MUR is the Message User Reference used by applications for reconciliation with ACK. It is a free-format field in which users may specify their own reference of up to 16 characters of the permitted character set.

    In user-to-user messages the MUR is field 108 in the user header block (block 3) while for system messages (category 0) the MUR when present it is field 108 in the text block (block 4).

    This comparator is intended for ACK matching. When you compare a service message 21 with a user MT, as an alternative to the AckMessageComparator that uses the full original message copy

    Since:
    8.0.3
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(SwiftMessage left, SwiftMessage right)
      Compare the two given messages based on the MUR.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • MurMessageComparator

        public MurMessageComparator()
    • Method Detail

      • compare

        public int compare​(SwiftMessage left,
                           SwiftMessage right)
        Compare the two given messages based on the MUR.
        Specified by:
        compare in interface java.util.Comparator<SwiftMessage>
        Parameters:
        left - a non-null message
        right - a non-null message