Esempio n. 1
0
 /**
  * Get a list of all occurrences of the field Field29F from the given block an empty list is
  * returned if none found.
  *
  * @param block may be empty or null in which case an empty list is returned
  */
 public static java.util.List<Field29F> getAll(final SwiftTagListBlock block) {
   if (block == null || block.isEmpty()) {
     return null;
   }
   final Field[] arr = block.getFieldsByName(NAME);
   if (arr != null && arr.length > 0) {
     final java.util.ArrayList<Field29F> result = new java.util.ArrayList<Field29F>(arr.length);
     for (final Field f : arr) {
       result.add((Field29F) f);
     }
     return result;
   }
   return java.util.Collections.emptyList();
 }
Esempio n. 2
0
 /**
  * Get the first occurrence form the tag list or null if not found.
  *
  * @return null if not found o block is null or empty
  * @param block may be null or empty
  */
 public static Field29F get(final SwiftTagListBlock block) {
   if (block == null || block.isEmpty()) {
     return null;
   }
   return (Field29F) block.getFieldByName(NAME);
 }