Class LogicalTerminalAddress


  • public class LogicalTerminalAddress
    extends BIC
    Identifies a logical channel connection to SWIFT, and the network uses it for addressing. It is basically a BIC code with an additional character identifier the terminal sending the message. The LT identifier is located in position 9 of a full 12 characters address. For example letter 'A' in CCCCUS33AXXX

    A sender LT address cannot have 'X' as LT identifier, conversely a receiver LT address must have an 'X' as LT identifier.

    Since:
    7.6
    • Constructor Detail

      • LogicalTerminalAddress

        public LogicalTerminalAddress​(java.lang.String code)
        Creates an LT address from its string value.

        If the string contains a BIC8 or BIC11 the LT identifier will be set with a default value. If the BIC has 12 characters, then the LT and branch is extracted from the parameter code. Finally if the BIC has a special size of 9 characters, that is parsed as the BIC8 plus the LT identifier, letting the branch with default.

        Parameters:
        code - a full LT address code (12 characters) or a BIC8, BIC11 or BIC8 plus LT identifier
    • Method Detail

      • getLTIdentifier

        public java.lang.Character getLTIdentifier()
      • setLTIdentifier

        public void setLTIdentifier​(java.lang.Character _lTIdentifier)
      • getSenderLogicalTerminalAddress

        public java.lang.String getSenderLogicalTerminalAddress()
        Returns a proper LT address for the sender of a message, assuring the returned code has 12 characters and with no "X" in the 9th position.

        If the terminal identifier is not set or if it is set to "X", then the default identifier "A" will be used.

        The branch code is padded with "XXX" if not present.

        Returns:
        the 12 characters address or null if the BIC has less than 8 characters
      • getReceiverLogicalTerminalAddress

        public java.lang.String getReceiverLogicalTerminalAddress()
        Returns a proper LT address for the receiver of a message, assuring the returned code has 12 characters and with a fixed "X" in the 9th position.

        The branch code is padded with "XXX" if not present.

        Returns:
        the 12 characters address or null if the BIC has less than 8 characters
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class BIC
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class BIC