Exemple #1
0
 /**
  * Iterates through block4 fields and return the first one whose name matches 72, or <code>null
  * </code> if none is found.<br>
  * The first occurrence of field 72 at MT291 is expected to be the only one.
  *
  * @return a Field72 object or <code>null</code> if the field is not found
  * @see SwiftTagListBlock#getTagByName(String)
  * @throws IllegalStateException if SwiftMessage object is not initialized
  */
 public Field72 getField72() {
   if (getSwiftMessage() == null) {
     throw new IllegalStateException("SwiftMessage was not initialized");
   }
   if (getSwiftMessage().getBlock4() == null) {
     log.info("block4 is null");
     return null;
   } else {
     final Tag t = getSwiftMessage().getBlock4().getTagByName("72");
     if (t == null) {
       log.fine("field 72 not found");
       return null;
     } else {
       return new Field72(t.getValue());
     }
   }
 }