diff --git a/build.gradle b/build.gradle
index 79dc56ecb..c94374e0b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -59,6 +59,7 @@ dependencies {
compileOnly 'javax.xml.bind:jaxb-api:2.3.1'
compileOnly 'javax.validation:validation-api:2.0.1.Final'
+ testImplementation 'javax.validation:validation-api:2.0.1.Final'
testImplementation 'javax.persistence:javax.persistence-api:2.2'
testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.22.0'
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field101.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field101.java
index d57c46a98..7153b4785 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field101.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field101.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 101");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field101(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field102.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field102.java
index 3bbe53977..b8029047c 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field102.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field102.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.LogicalTerminalAddress;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -205,14 +202,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 102");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -227,7 +221,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -470,7 +464,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field102(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field103.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field103.java
index 59cc859bc..27f295b48 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field103.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field103.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 103");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field103(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field104.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field104.java
index 2958e5d3e..5bb0ae040 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field104.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field104.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 104");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field104(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field105.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field105.java
index 4a0933a96..e264fa5a4 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field105.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field105.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 105");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field105 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Delivery Monitoring content to set
- * @return the field object to enable build pattern
- */
- public Field105 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Delivery Monitoring (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Delivery Monitoring content to set
* @return the field object to enable build pattern
- * @see #setDeliveryMonitoring(java.lang.Long)
*/
public Field105 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field105 setDeliveryMonitoring(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Delivery Monitoring (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Delivery Monitoring content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field105 setDeliveryMonitoring(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Delivery Monitoring (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Delivery Monitoring content to set
* @return the field object to enable build pattern
- * @see #setDeliveryMonitoring(java.lang.Long)
*/
public Field105 setDeliveryMonitoring(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field105(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field106.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field106.java
index b6109fd6e..118b7b4d4 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field106.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field106.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 106");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field106(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field107.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field107.java
index ce085fc63..c0c49bfc4 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field107.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field107.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 107");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field107(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field108.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field108.java
index 7a8fbda13..37402f498 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field108.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field108.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 108");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field108(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field109.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field109.java
index cd5b2b1e7..d9bed01c3 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field109.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field109.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -248,11 +245,9 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
- if (component == 3) {
- //default format (as is)
- return getComponent(3);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(3);
}
/**
@@ -267,7 +262,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -571,6 +566,7 @@ public Field109 setMIR(String component3) {
*
* @return the list of converted components (a Calendar object or null)
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -648,7 +644,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field109(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field110.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field110.java
index e84db9d2b..cff061b44 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field110.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field110.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 110");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field110 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Window Size content to set
- * @return the field object to enable build pattern
- */
- public Field110 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Window Size (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Window Size content to set
* @return the field object to enable build pattern
- * @see #setWindowSize(java.lang.Long)
*/
public Field110 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field110 setWindowSize(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Window Size (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Window Size content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field110 setWindowSize(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Window Size (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Window Size content to set
* @return the field object to enable build pattern
- * @see #setWindowSize(java.lang.Long)
*/
public Field110 setWindowSize(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field110(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field111.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field111.java
index 7da76c56c..a16d788ff 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field111.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field111.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 111");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field111 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Service Type Identifier content to set
- * @return the field object to enable build pattern
- */
- public Field111 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Service Type Identifier (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Service Type Identifier content to set
* @return the field object to enable build pattern
- * @see #setServiceTypeIdentifier(java.lang.Long)
*/
public Field111 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field111 setServiceTypeIdentifier(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Service Type Identifier (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Service Type Identifier content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field111 setServiceTypeIdentifier(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Service Type Identifier (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Service Type Identifier content to set
* @return the field object to enable build pattern
- * @see #setServiceTypeIdentifier(java.lang.Long)
*/
public Field111 setServiceTypeIdentifier(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field111(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field113.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field113.java
index a03bcf530..f1e42ed0d 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field113.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field113.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 113");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field113(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field114.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field114.java
index f17e8a29f..52085a4bc 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field114.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field114.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 114");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field114(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field115.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field115.java
index 07396899d..329819e1b 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field115.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field115.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 115");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field115(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field116.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field116.java
index c757e1c6f..1212a0b0e 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field116.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field116.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 116");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -469,7 +463,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field116(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field117.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field117.java
index 20cf9796d..55ccab6df 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field117.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field117.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 117");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field117(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field118.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field118.java
index 527aac845..67e19bb85 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field118.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field118.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 118");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -469,7 +463,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field118(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field119.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field119.java
index 17d471264..fff42e15c 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field119.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field119.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 119");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field119(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field11A.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field11A.java
index 3bdb1348f..129bf63f9 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field11A.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field11A.java
@@ -33,12 +33,9 @@
import com.prowidesoftware.swift.model.field.CurrencyContainer;
import com.prowidesoftware.swift.model.field.CurrencyResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -232,11 +229,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -251,7 +246,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -510,26 +505,32 @@ public Field11A setCurrency(java.util.Currency component2) {
}
+ @Override
public List currencyStrings() {
return CurrencyResolver.currencyStrings(this);
}
+ @Override
public List currencies() {
return CurrencyResolver.currencies(this);
}
+ @Override
public Currency currency() {
return CurrencyResolver.resolveCurrency(this);
}
+ @Override
public String currencyString() {
return CurrencyResolver.resolveCurrencyString(this);
}
+ @Override
public void initializeCurrencies(String cur) {
CurrencyResolver.resolveSetCurrency(this, cur);
}
+ @Override
public void initializeCurrencies(Currency cur) {
CurrencyResolver.resolveSetCurrency(this, cur);
}
@@ -541,6 +542,7 @@ public void initializeCurrencies(Currency cur) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return null;
}
@@ -551,6 +553,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -565,6 +568,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -632,7 +636,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field11A(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field11R.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field11R.java
index 2cc498cf7..93cb9ac8f 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field11R.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field11R.java
@@ -35,12 +35,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -280,11 +277,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -299,7 +294,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -670,32 +665,14 @@ public Field11R setComponent3(String component3) {
return this;
}
- /**
- * Set the component3 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent3(String)
- * method.
- *
- * @see #setComponent3(String)
- * @since 9.2.7
- *
- * @param component3 the Long with the Session Number content to set
- * @return the field object to enable build pattern
- */
- public Field11R setComponent3(java.lang.Long component3) {
- setComponent(3, SwiftFormatUtils.getLong(component3));
- return this;
- }
/**
* Alternative method setter for field's Session Number (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Session Number content to set
* @return the field object to enable build pattern
- * @see #setSessionNumber(java.lang.Long)
*/
public Field11R setComponent3(java.lang.Number component3) {
@@ -725,27 +702,13 @@ public Field11R setSessionNumber(String component3) {
return setComponent3(component3);
}
- /**
- * Set the Session Number (component 3) from a Long object.
- *
- * @see #setComponent3(java.lang.Long)
- *
- * @param component3 Long with the Session Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field11R setSessionNumber(java.lang.Long component3) {
- return setComponent3(component3);
- }
-
/**
* Alternative method setter for field's Session Number (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Session Number content to set
* @return the field object to enable build pattern
- * @see #setSessionNumber(java.lang.Long)
*/
public Field11R setSessionNumber(java.lang.Number component3) {
return setComponent3(component3);
@@ -762,32 +725,14 @@ public Field11R setComponent4(String component4) {
return this;
}
- /**
- * Set the component4 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent4(String)
- * method.
- *
- * @see #setComponent4(String)
- * @since 9.2.7
- *
- * @param component4 the Long with the ISN content to set
- * @return the field object to enable build pattern
- */
- public Field11R setComponent4(java.lang.Long component4) {
- setComponent(4, SwiftFormatUtils.getLong(component4));
- return this;
- }
/**
* Alternative method setter for field's ISN (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the ISN content to set
* @return the field object to enable build pattern
- * @see #setISN(java.lang.Long)
*/
public Field11R setComponent4(java.lang.Number component4) {
@@ -817,27 +762,13 @@ public Field11R setISN(String component4) {
return setComponent4(component4);
}
- /**
- * Set the ISN (component 4) from a Long object.
- *
- * @see #setComponent4(java.lang.Long)
- *
- * @param component4 Long with the ISN content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field11R setISN(java.lang.Long component4) {
- return setComponent4(component4);
- }
-
/**
* Alternative method setter for field's ISN (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the ISN content to set
* @return the field object to enable build pattern
- * @see #setISN(java.lang.Long)
*/
public Field11R setISN(java.lang.Number component4) {
return setComponent4(component4);
@@ -849,6 +780,7 @@ public Field11R setISN(java.lang.Number component4) {
*
* @return the list of converted components (a Calendar object or null)
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -926,7 +858,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field11R(f));
}
@@ -942,6 +874,7 @@ public static List getAll(final SwiftTagListBlock block) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line) {
return getLine(line, 0);
}
@@ -955,6 +888,7 @@ public String getLine(int line) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line, int offset) {
Field11R cp = newInstance(this);
return getLine(cp, line, null, offset);
@@ -967,6 +901,7 @@ public String getLine(int line, int offset) {
* @return lines content or empty list if field's value is empty
* @since 7.7
*/
+ @Override
public List getLines() {
return SwiftParseUtils.getLines(getValue());
}
@@ -979,6 +914,7 @@ public List getLines() {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLines(int offset) {
Field11R cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, null, null, offset));
@@ -993,6 +929,7 @@ public List getLines(int offset) {
* @return found lines or empty list if value is empty
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end) {
return getLinesBetween(start, end, 0);
}
@@ -1007,6 +944,7 @@ public List getLinesBetween(int start, int end) {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end, int offset) {
Field11R cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, start, end, offset));
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field11S.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field11S.java
index 5877397bd..84b723011 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field11S.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field11S.java
@@ -35,12 +35,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -280,11 +277,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -299,7 +294,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -670,32 +665,14 @@ public Field11S setComponent3(String component3) {
return this;
}
- /**
- * Set the component3 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent3(String)
- * method.
- *
- * @see #setComponent3(String)
- * @since 9.2.7
- *
- * @param component3 the Long with the Session Number content to set
- * @return the field object to enable build pattern
- */
- public Field11S setComponent3(java.lang.Long component3) {
- setComponent(3, SwiftFormatUtils.getLong(component3));
- return this;
- }
/**
* Alternative method setter for field's Session Number (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Session Number content to set
* @return the field object to enable build pattern
- * @see #setSessionNumber(java.lang.Long)
*/
public Field11S setComponent3(java.lang.Number component3) {
@@ -725,27 +702,13 @@ public Field11S setSessionNumber(String component3) {
return setComponent3(component3);
}
- /**
- * Set the Session Number (component 3) from a Long object.
- *
- * @see #setComponent3(java.lang.Long)
- *
- * @param component3 Long with the Session Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field11S setSessionNumber(java.lang.Long component3) {
- return setComponent3(component3);
- }
-
/**
* Alternative method setter for field's Session Number (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Session Number content to set
* @return the field object to enable build pattern
- * @see #setSessionNumber(java.lang.Long)
*/
public Field11S setSessionNumber(java.lang.Number component3) {
return setComponent3(component3);
@@ -762,32 +725,14 @@ public Field11S setComponent4(String component4) {
return this;
}
- /**
- * Set the component4 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent4(String)
- * method.
- *
- * @see #setComponent4(String)
- * @since 9.2.7
- *
- * @param component4 the Long with the ISN content to set
- * @return the field object to enable build pattern
- */
- public Field11S setComponent4(java.lang.Long component4) {
- setComponent(4, SwiftFormatUtils.getLong(component4));
- return this;
- }
/**
* Alternative method setter for field's ISN (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the ISN content to set
* @return the field object to enable build pattern
- * @see #setISN(java.lang.Long)
*/
public Field11S setComponent4(java.lang.Number component4) {
@@ -817,27 +762,13 @@ public Field11S setISN(String component4) {
return setComponent4(component4);
}
- /**
- * Set the ISN (component 4) from a Long object.
- *
- * @see #setComponent4(java.lang.Long)
- *
- * @param component4 Long with the ISN content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field11S setISN(java.lang.Long component4) {
- return setComponent4(component4);
- }
-
/**
* Alternative method setter for field's ISN (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the ISN content to set
* @return the field object to enable build pattern
- * @see #setISN(java.lang.Long)
*/
public Field11S setISN(java.lang.Number component4) {
return setComponent4(component4);
@@ -849,6 +780,7 @@ public Field11S setISN(java.lang.Number component4) {
*
* @return the list of converted components (a Calendar object or null)
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -926,7 +858,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field11S(f));
}
@@ -942,6 +874,7 @@ public static List getAll(final SwiftTagListBlock block) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line) {
return getLine(line, 0);
}
@@ -955,6 +888,7 @@ public String getLine(int line) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line, int offset) {
Field11S cp = newInstance(this);
return getLine(cp, line, null, offset);
@@ -967,6 +901,7 @@ public String getLine(int line, int offset) {
* @return lines content or empty list if field's value is empty
* @since 7.7
*/
+ @Override
public List getLines() {
return SwiftParseUtils.getLines(getValue());
}
@@ -979,6 +914,7 @@ public List getLines() {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLines(int offset) {
Field11S cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, null, null, offset));
@@ -993,6 +929,7 @@ public List getLines(int offset) {
* @return found lines or empty list if value is empty
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end) {
return getLinesBetween(start, end, 0);
}
@@ -1007,6 +944,7 @@ public List getLinesBetween(int start, int end) {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end, int offset) {
Field11S cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, start, end, offset));
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12.java
index 7cdf9b1dc..3c353f6ec 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 12");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field12 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Message Type content to set
- * @return the field object to enable build pattern
- */
- public Field12 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Message Type (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Message Type content to set
* @return the field object to enable build pattern
- * @see #setMessageType(java.lang.Long)
*/
public Field12 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field12 setMessageType(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Message Type (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Message Type content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field12 setMessageType(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Message Type (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Message Type content to set
* @return the field object to enable build pattern
- * @see #setMessageType(java.lang.Long)
*/
public Field12 setMessageType(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field120.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field120.java
index 87ea6d68a..5361a050e 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field120.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field120.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 120");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field120 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Identifier content to set
- * @return the field object to enable build pattern
- */
- public Field120 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Identifier (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Identifier content to set
* @return the field object to enable build pattern
- * @see #setIdentifier(java.lang.Long)
*/
public Field120 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field120 setIdentifier(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Identifier (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Identifier content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field120 setIdentifier(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Identifier (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Identifier content to set
* @return the field object to enable build pattern
- * @see #setIdentifier(java.lang.Long)
*/
public Field120 setIdentifier(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field120(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field121.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field121.java
index 52a5f6355..7b481b2eb 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field121.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field121.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 121");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field121(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field122.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field122.java
index 2debe8c65..fbcd34453 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field122.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field122.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 122");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -425,32 +419,14 @@ public Field122 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Number Of Messages content to set
- * @return the field object to enable build pattern
- */
- public Field122 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Number Of Messages (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number Of Messages content to set
* @return the field object to enable build pattern
- * @see #setNumberOfMessages(java.lang.Long)
*/
public Field122 setComponent1(java.lang.Number component1) {
@@ -480,27 +456,13 @@ public Field122 setNumberOfMessages(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Number Of Messages (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Number Of Messages content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field122 setNumberOfMessages(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Number Of Messages (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number Of Messages content to set
* @return the field object to enable build pattern
- * @see #setNumberOfMessages(java.lang.Long)
*/
public Field122 setNumberOfMessages(java.lang.Number component1) {
return setComponent1(component1);
@@ -515,16 +477,6 @@ public Field122 setNumberofMessages(String component1) {
return setNumberOfMessages(component1);
}
- /**
- * @deprecated use #setComponent1(java.lang.Long) instead
- * @since 9.2.7
- */
- @Deprecated
- @ProwideDeprecated(phase4 = TargetYear.SRU2024)
- public Field122 setNumberofMessages(java.lang.Long component1) {
- return setNumberOfMessages(component1);
- }
-
/**
* @deprecated use #setNumberOfMessages(java.lang.Long) instead
*/
@@ -599,7 +551,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field122(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field123.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field123.java
index 0a7c5fc3c..4e00f72d6 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field123.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field123.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 123");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field123(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field124.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field124.java
index 6c3c61278..14b47755a 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field124.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field124.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 124");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -431,7 +425,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field124(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field125.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field125.java
index 363093e25..f7827ce8e 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field125.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field125.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 125");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field125 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Category content to set
- * @return the field object to enable build pattern
- */
- public Field125 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Category (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Category content to set
* @return the field object to enable build pattern
- * @see #setCategory(java.lang.Long)
*/
public Field125 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field125 setCategory(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Category (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Category content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field125 setCategory(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Category (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Category content to set
* @return the field object to enable build pattern
- * @see #setCategory(java.lang.Long)
*/
public Field125 setCategory(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field125(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field126.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field126.java
index bf7ef458b..d55cee7c7 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field126.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field126.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 126");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field126 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Seed content to set
- * @return the field object to enable build pattern
- */
- public Field126 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Seed (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Seed content to set
* @return the field object to enable build pattern
- * @see #setSeed(java.lang.Long)
*/
public Field126 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field126 setSeed(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Seed (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Seed content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field126 setSeed(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Seed (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Seed content to set
* @return the field object to enable build pattern
- * @see #setSeed(java.lang.Long)
*/
public Field126 setSeed(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field126(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field127.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field127.java
index 254361ea1..5b0a1372a 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field127.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field127.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 127");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field127(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field128.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field128.java
index 204220f8e..f095f46fe 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field128.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field128.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.BICContainer;
import com.prowidesoftware.swift.model.field.BICResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -223,11 +220,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -242,7 +237,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -461,10 +456,12 @@ public Field128 setBIC(com.prowidesoftware.swift.model.BIC component2) {
}
+ @Override
public List bics() {
return BICResolver.bics(this);
}
+ @Override
public List bicStrings () {
return BICResolver.bicStrings(this);
}
@@ -533,7 +530,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field128(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field129.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field129.java
index c047b861b..ff8964280 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field129.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field129.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -222,11 +219,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -241,7 +236,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -464,32 +459,14 @@ public Field129 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Section content to set
- * @return the field object to enable build pattern
- */
- public Field129 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Section (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Section content to set
* @return the field object to enable build pattern
- * @see #setSection(java.lang.Long)
*/
public Field129 setComponent1(java.lang.Number component1) {
@@ -519,27 +496,13 @@ public Field129 setSection(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Section (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Section content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field129 setSection(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Section (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Section content to set
* @return the field object to enable build pattern
- * @see #setSection(java.lang.Long)
*/
public Field129 setSection(java.lang.Number component1) {
return setComponent1(component1);
@@ -556,32 +519,14 @@ public Field129 setComponent2(String component2) {
return this;
}
- /**
- * Set the component2 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent2(String)
- * method.
- *
- * @see #setComponent2(String)
- * @since 9.2.7
- *
- * @param component2 the Long with the Total content to set
- * @return the field object to enable build pattern
- */
- public Field129 setComponent2(java.lang.Long component2) {
- setComponent(2, SwiftFormatUtils.getLong(component2));
- return this;
- }
/**
* Alternative method setter for field's Total (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Total content to set
* @return the field object to enable build pattern
- * @see #setTotal(java.lang.Long)
*/
public Field129 setComponent2(java.lang.Number component2) {
@@ -611,27 +556,13 @@ public Field129 setTotal(String component2) {
return setComponent2(component2);
}
- /**
- * Set the Total (component 2) from a Long object.
- *
- * @see #setComponent2(java.lang.Long)
- *
- * @param component2 Long with the Total content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field129 setTotal(java.lang.Long component2) {
- return setComponent2(component2);
- }
-
/**
* Alternative method setter for field's Total (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Total content to set
* @return the field object to enable build pattern
- * @see #setTotal(java.lang.Long)
*/
public Field129 setTotal(java.lang.Number component2) {
return setComponent2(component2);
@@ -702,7 +633,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field129(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12A.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12A.java
index 030748293..1af9f6266 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12A.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12A.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.field.GenericField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -242,11 +239,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
- if (component == 3) {
- //default format (as is)
- return getComponent(3);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(3);
}
/**
@@ -261,7 +256,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -512,6 +507,7 @@ public Field12A setInstrumentCode(String component3) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return getComponent2();
}
@@ -522,6 +518,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return getComponent2() != null;
}
@@ -536,6 +533,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -603,7 +601,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12A(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12B.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12B.java
index d4286ba8d..d2c770840 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12B.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12B.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.field.GenericField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -241,11 +238,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
- if (component == 3) {
- //default format (as is)
- return getComponent(3);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(3);
}
/**
@@ -260,7 +255,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -507,6 +502,7 @@ public Field12B setType(String component3) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return getComponent2();
}
@@ -517,6 +513,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return getComponent2() != null;
}
@@ -531,6 +528,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -598,7 +596,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12B(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12C.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12C.java
index df7992918..c833fefef 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12C.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12C.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.field.GenericField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -222,11 +219,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -241,7 +236,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -427,6 +422,7 @@ public Field12C setCFICode(String component2) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return null;
}
@@ -437,6 +433,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -451,6 +448,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -518,7 +516,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12C(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12D.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12D.java
index 343b895d6..96e86be85 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12D.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12D.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 12D");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12D(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12E.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12E.java
index 5797b406c..73e44836f 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12E.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12E.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -217,14 +214,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 12E");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -239,7 +233,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -482,7 +476,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12E(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12F.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12F.java
index 4fdcdcb80..e2155cbba 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12F.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12F.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 12F");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12F(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field12G.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field12G.java
index 948087f34..2a1d3dc72 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field12G.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field12G.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 12G");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field12G(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field130.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field130.java
index 232e4abb4..f69e0e879 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field130.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field130.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.MultiLineField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -258,11 +255,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -277,7 +272,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -538,32 +533,14 @@ public Field130 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Heading Code content to set
- * @return the field object to enable build pattern
- */
- public Field130 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Heading Code (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Heading Code content to set
* @return the field object to enable build pattern
- * @see #setHeadingCode(java.lang.Long)
*/
public Field130 setComponent1(java.lang.Number component1) {
@@ -593,27 +570,13 @@ public Field130 setHeadingCode(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Heading Code (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Heading Code content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field130 setHeadingCode(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Heading Code (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Heading Code content to set
* @return the field object to enable build pattern
- * @see #setHeadingCode(java.lang.Long)
*/
public Field130 setHeadingCode(java.lang.Number component1) {
return setComponent1(component1);
@@ -651,32 +614,14 @@ public Field130 setComponent3(String component3) {
return this;
}
- /**
- * Set the component3 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent3(String)
- * method.
- *
- * @see #setComponent3(String)
- * @since 9.2.7
- *
- * @param component3 the Long with the Heading Code 2 content to set
- * @return the field object to enable build pattern
- */
- public Field130 setComponent3(java.lang.Long component3) {
- setComponent(3, SwiftFormatUtils.getLong(component3));
- return this;
- }
/**
* Alternative method setter for field's Heading Code 2 (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Heading Code 2 content to set
* @return the field object to enable build pattern
- * @see #setHeadingCode2(java.lang.Long)
*/
public Field130 setComponent3(java.lang.Number component3) {
@@ -706,27 +651,13 @@ public Field130 setHeadingCode2(String component3) {
return setComponent3(component3);
}
- /**
- * Set the Heading Code 2 (component 3) from a Long object.
- *
- * @see #setComponent3(java.lang.Long)
- *
- * @param component3 Long with the Heading Code 2 content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field130 setHeadingCode2(java.lang.Long component3) {
- return setComponent3(component3);
- }
-
/**
* Alternative method setter for field's Heading Code 2 (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Heading Code 2 content to set
* @return the field object to enable build pattern
- * @see #setHeadingCode2(java.lang.Long)
*/
public Field130 setHeadingCode2(java.lang.Number component3) {
return setComponent3(component3);
@@ -818,7 +749,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field130(f));
}
@@ -834,6 +765,7 @@ public static List getAll(final SwiftTagListBlock block) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line) {
return getLine(line, 0);
}
@@ -847,6 +779,7 @@ public String getLine(int line) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line, int offset) {
Field130 cp = newInstance(this);
return getLine(cp, line, null, offset);
@@ -859,6 +792,7 @@ public String getLine(int line, int offset) {
* @return lines content or empty list if field's value is empty
* @since 7.7
*/
+ @Override
public List getLines() {
return SwiftParseUtils.getLines(getValue());
}
@@ -871,6 +805,7 @@ public List getLines() {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLines(int offset) {
Field130 cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, null, null, offset));
@@ -885,6 +820,7 @@ public List getLines(int offset) {
* @return found lines or empty list if value is empty
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end) {
return getLinesBetween(start, end, 0);
}
@@ -899,6 +835,7 @@ public List getLinesBetween(int start, int end) {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end, int offset) {
Field130 cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, start, end, offset));
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field132.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field132.java
index c5669dbf1..664fe0adf 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field132.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field132.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -220,11 +217,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -239,7 +234,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -448,32 +443,14 @@ public Field132 setComponent2(String component2) {
return this;
}
- /**
- * Set the component2 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent2(String)
- * method.
- *
- * @see #setComponent2(String)
- * @since 9.2.7
- *
- * @param component2 the Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- */
- public Field132 setComponent2(java.lang.Long component2) {
- setComponent(2, SwiftFormatUtils.getLong(component2));
- return this;
- }
/**
* Alternative method setter for field's Broadcast Number (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field132 setComponent2(java.lang.Number component2) {
@@ -503,27 +480,13 @@ public Field132 setBroadcastNumber(String component2) {
return setComponent2(component2);
}
- /**
- * Set the Broadcast Number (component 2) from a Long object.
- *
- * @see #setComponent2(java.lang.Long)
- *
- * @param component2 Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field132 setBroadcastNumber(java.lang.Long component2) {
- return setComponent2(component2);
- }
-
/**
* Alternative method setter for field's Broadcast Number (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field132 setBroadcastNumber(java.lang.Number component2) {
return setComponent2(component2);
@@ -594,7 +557,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field132(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field133.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field133.java
index 41adf2d0d..30c426856 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field133.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field133.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -255,11 +252,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -274,7 +269,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -560,32 +555,14 @@ public Field133 setComponent4(String component4) {
return this;
}
- /**
- * Set the component4 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent4(String)
- * method.
- *
- * @see #setComponent4(String)
- * @since 9.2.7
- *
- * @param component4 the Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- */
- public Field133 setComponent4(java.lang.Long component4) {
- setComponent(4, SwiftFormatUtils.getLong(component4));
- return this;
- }
/**
* Alternative method setter for field's Broadcast Number (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field133 setComponent4(java.lang.Number component4) {
@@ -615,27 +592,13 @@ public Field133 setBroadcastNumber(String component4) {
return setComponent4(component4);
}
- /**
- * Set the Broadcast Number (component 4) from a Long object.
- *
- * @see #setComponent4(java.lang.Long)
- *
- * @param component4 Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field133 setBroadcastNumber(java.lang.Long component4) {
- return setComponent4(component4);
- }
-
/**
* Alternative method setter for field's Broadcast Number (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field133 setBroadcastNumber(java.lang.Number component4) {
return setComponent4(component4);
@@ -706,7 +669,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field133(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field134.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field134.java
index 36f947632..34682adde 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field134.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field134.java
@@ -33,12 +33,9 @@
import com.prowidesoftware.swift.model.field.BICContainer;
import com.prowidesoftware.swift.model.field.BICResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -240,11 +237,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
- if (component == 3) {
- //default format (as is)
- return getComponent(3);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(3);
}
/**
@@ -259,7 +254,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -518,10 +513,12 @@ public Field134 setBroadcastRequesterCity(String component3) {
}
+ @Override
public List bics() {
return BICResolver.bics(this);
}
+ @Override
public List bicStrings () {
return BICResolver.bicStrings(this);
}
@@ -590,7 +587,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field134(f));
}
@@ -606,6 +603,7 @@ public static List getAll(final SwiftTagListBlock block) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line) {
return getLine(line, 0);
}
@@ -619,6 +617,7 @@ public String getLine(int line) {
* @return line content or null if not present or if line number is above the expected
* @since 7.7
*/
+ @Override
public String getLine(int line, int offset) {
Field134 cp = newInstance(this);
return getLine(cp, line, null, offset);
@@ -631,6 +630,7 @@ public String getLine(int line, int offset) {
* @return lines content or empty list if field's value is empty
* @since 7.7
*/
+ @Override
public List getLines() {
return SwiftParseUtils.getLines(getValue());
}
@@ -643,6 +643,7 @@ public List getLines() {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLines(int offset) {
Field134 cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, null, null, offset));
@@ -657,6 +658,7 @@ public List getLines(int offset) {
* @return found lines or empty list if value is empty
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end) {
return getLinesBetween(start, end, 0);
}
@@ -671,6 +673,7 @@ public List getLinesBetween(int start, int end) {
* @return found lines or empty list if lines are not present or the offset is invalid
* @since 7.7
*/
+ @Override
public List getLinesBetween(int start, int end, int offset) {
Field134 cp = newInstance(this);
return SwiftParseUtils.getLines(getLine(cp, start, end, offset));
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field135.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field135.java
index 618d9118b..dbe064e4d 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field135.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field135.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 135");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field135(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field136.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field136.java
index 0681fa123..9c9754224 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field136.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field136.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -220,11 +217,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -239,7 +234,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -445,32 +440,14 @@ public Field136 setComponent2(String component2) {
return this;
}
- /**
- * Set the component2 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent2(String)
- * method.
- *
- * @see #setComponent2(String)
- * @since 9.2.7
- *
- * @param component2 the Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- */
- public Field136 setComponent2(java.lang.Long component2) {
- setComponent(2, SwiftFormatUtils.getLong(component2));
- return this;
- }
/**
* Alternative method setter for field's Broadcast Number (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field136 setComponent2(java.lang.Number component2) {
@@ -500,27 +477,13 @@ public Field136 setBroadcastNumber(String component2) {
return setComponent2(component2);
}
- /**
- * Set the Broadcast Number (component 2) from a Long object.
- *
- * @see #setComponent2(java.lang.Long)
- *
- * @param component2 Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field136 setBroadcastNumber(java.lang.Long component2) {
- return setComponent2(component2);
- }
-
/**
* Alternative method setter for field's Broadcast Number (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field136 setBroadcastNumber(java.lang.Number component2) {
return setComponent2(component2);
@@ -591,7 +554,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field136(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field137.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field137.java
index 289cf62ea..47e5282b0 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field137.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field137.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -255,11 +252,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -274,7 +269,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -560,32 +555,14 @@ public Field137 setComponent4(String component4) {
return this;
}
- /**
- * Set the component4 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent4(String)
- * method.
- *
- * @see #setComponent4(String)
- * @since 9.2.7
- *
- * @param component4 the Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- */
- public Field137 setComponent4(java.lang.Long component4) {
- setComponent(4, SwiftFormatUtils.getLong(component4));
- return this;
- }
/**
* Alternative method setter for field's Broadcast Number (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field137 setComponent4(java.lang.Number component4) {
@@ -615,27 +592,13 @@ public Field137 setBroadcastNumber(String component4) {
return setComponent4(component4);
}
- /**
- * Set the Broadcast Number (component 4) from a Long object.
- *
- * @see #setComponent4(java.lang.Long)
- *
- * @param component4 Long with the Broadcast Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field137 setBroadcastNumber(java.lang.Long component4) {
- return setComponent4(component4);
- }
-
/**
* Alternative method setter for field's Broadcast Number (component 4) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component4 the Number with the Broadcast Number content to set
* @return the field object to enable build pattern
- * @see #setBroadcastNumber(java.lang.Long)
*/
public Field137 setBroadcastNumber(java.lang.Number component4) {
return setComponent4(component4);
@@ -706,7 +669,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field137(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field13A.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field13A.java
index d4b42f975..e109df9e5 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field13A.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field13A.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.field.GenericField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -228,11 +225,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -247,7 +242,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -451,6 +446,7 @@ public Field13A setNumberIdentification(String component2) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return null;
}
@@ -461,6 +457,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -475,6 +472,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -542,7 +540,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field13A(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field13B.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field13B.java
index ba91c7b57..1a28c0f4e 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field13B.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field13B.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.field.GenericField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -235,11 +232,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
- if (component == 3) {
- //default format (as is)
- return getComponent(3);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(3);
}
/**
@@ -254,7 +249,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -483,6 +478,7 @@ public Field13B setNumber(String component3) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return getComponent2();
}
@@ -493,6 +489,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return getComponent2() != null;
}
@@ -507,6 +504,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -574,7 +572,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field13B(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field13C.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field13C.java
index a935203db..2bae39eef 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field13C.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field13C.java
@@ -30,12 +30,9 @@
import java.util.Calendar;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -273,11 +270,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -292,7 +287,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -775,7 +770,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field13C(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field13D.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field13D.java
index ac9f4a9ce..8966998a0 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field13D.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field13D.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -261,11 +258,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -280,7 +275,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -664,6 +659,7 @@ public Field13D setOffset(java.util.Calendar component4) {
*
* @return the list of converted components (a Calendar object or null)
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -741,7 +737,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field13D(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field13J.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field13J.java
index 74e268389..50b521c41 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field13J.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field13J.java
@@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.field.GenericField;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -229,11 +226,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -248,7 +243,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -456,6 +451,7 @@ public Field13J setCode(String component2) {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return null;
}
@@ -466,6 +462,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -480,6 +477,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -547,7 +545,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field13J(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field13K.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field13K.java
index 00262ceec..b101aba63 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field13K.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field13K.java
@@ -34,12 +34,9 @@
import com.prowidesoftware.swift.model.field.AmountContainer;
import com.prowidesoftware.swift.model.field.AmountResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -247,14 +244,13 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
- if (component == 3) {
- //amount, rate
- java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale));
- f.setMaximumFractionDigits(13);
- BigDecimal n = getComponent3AsBigDecimal();
- if (n != null) {
- return f.format(n);
- }
+ // This is the last component, return directly without `if`
+ //amount, rate
+ java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale));
+ f.setMaximumFractionDigits(13);
+ BigDecimal n = getComponent3AsBigDecimal();
+ if (n != null) {
+ return f.format(n);
}
return null;
}
@@ -271,7 +267,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -547,32 +543,13 @@ public Field13K setComponent3(String component3) {
return this;
}
- /**
- * Set the component3 from a BigDecimal object.
- *
- * Parses the BigDecimal into a SWIFT amount with truncated zero decimals and mandatory decimal separator.
- *
- * - Example: 1234.00 -> 1234,
- * - Example: 1234 -> 1234,
- * - Example: 1234.56 -> 1234,56
- *
- * @since 9.2.7
- *
- * @param component3 the BigDecimal with the Quantity content to set
- * @return the field object to enable build pattern
- */
- public Field13K setComponent3(java.math.BigDecimal component3) {
- setComponent(3, SwiftFormatUtils.getBigDecimal(component3));
- return this;
- }
/**
* Alternative method setter for field's Quantity (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10.0 becomes an Float)
*
* @param component3 the Number with the Quantity content to set
* @return the field object to enable build pattern
- * @see #setQuantity(java.math.BigDecimal)
*/
public Field13K setComponent3(java.lang.Number component3) {
@@ -604,27 +581,13 @@ public Field13K setQuantity(String component3) {
return setComponent3(component3);
}
- /**
- * Set the Quantity (component 3) from a BigDecimal object.
- *
- * @see #setComponent3(java.math.BigDecimal)
- *
- * @param component3 BigDecimal with the Quantity content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field13K setQuantity(java.math.BigDecimal component3) {
- return setComponent3(component3);
- }
-
/**
* Alternative method setter for field's Quantity (component 3) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component3 the Number with the Quantity content to set
* @return the field object to enable build pattern
- * @see #setQuantity(java.math.BigDecimal)
*/
public Field13K setQuantity(java.lang.Number component3) {
return setComponent3(component3);
@@ -639,16 +602,6 @@ public Field13K setAmount(String component3) {
return setQuantity(component3);
}
- /**
- * @deprecated use #setComponent3(java.math.BigDecimal) instead
- * @since 9.2.7
- */
- @Deprecated
- @ProwideDeprecated(phase4 = TargetYear.SRU2024)
- public Field13K setAmount(java.math.BigDecimal component3) {
- return setQuantity(component3);
- }
-
/**
* @deprecated use #setQuantity(java.math.BigDecimal) instead
*/
@@ -675,6 +628,7 @@ public List amounts() {
* @return the first amount as BigDecimal value. Can be null
* @see AmountResolver#amount(Field)
*/
+ @Override
public BigDecimal amount() {
return AmountResolver.amount(this);
}
@@ -686,6 +640,7 @@ public BigDecimal amount() {
*
* @return DSS component value or null if the DSS is not set or not available for this field.
*/
+ @Override
public String getDSS() {
return null;
}
@@ -696,6 +651,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -710,6 +666,7 @@ public boolean isDSSPresent() {
*
* @return for generic fields returns the value of the conditional qualifier or null if not set or not applicable for this field.
*/
+ @Override
public String getConditionalQualifier() {
return getComponent(CONDITIONAL_QUALIFIER);
}
@@ -777,7 +734,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field13K(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field140.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field140.java
index de411e41d..1181d47b6 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field140.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field140.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 140");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field140 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Identifier content to set
- * @return the field object to enable build pattern
- */
- public Field140 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Identifier (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Identifier content to set
* @return the field object to enable build pattern
- * @see #setIdentifier(java.lang.Long)
*/
public Field140 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field140 setIdentifier(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Identifier (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Identifier content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field140 setIdentifier(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Identifier (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Identifier content to set
* @return the field object to enable build pattern
- * @see #setIdentifier(java.lang.Long)
*/
public Field140 setIdentifier(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field140(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field141.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field141.java
index 4d428b048..f656cfeae 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field141.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field141.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 141");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field141(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field142.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field142.java
index 8353a7f3f..3f30664e7 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field142.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field142.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -207,17 +204,15 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 142");
}
- if (component == 1) {
- //datetime: [YY]YYMMDDHHMM
- java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale));
- java.text.DateFormat tf = new java.text.SimpleDateFormat("HH:mm", notNull(locale));
- java.util.Calendar cal = getComponent1AsCalendar();
- if (cal != null) {
- return df.format(cal.getTime()) + " " + tf.format(cal.getTime());
- }
+ //datetime: [YY]YYMMDDHHMM
+ java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale));
+ java.text.DateFormat tf = new java.text.SimpleDateFormat("HH:mm", notNull(locale));
+ java.util.Calendar cal = getComponent1AsCalendar();
+ if (cal != null) {
+ return df.format(cal.getTime()) + " " + tf.format(cal.getTime());
}
return null;
}
@@ -234,7 +229,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -419,6 +414,7 @@ public Field142 setStartDateTime(java.util.Calendar component1) {
* @return the list of converted components (a Calendar object or null)
* @since 9.2.7
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -497,7 +493,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field142(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field143.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field143.java
index 22c1e7e5c..9967814df 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field143.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field143.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -207,17 +204,15 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 143");
}
- if (component == 1) {
- //datetime: [YY]YYMMDDHHMM
- java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale));
- java.text.DateFormat tf = new java.text.SimpleDateFormat("HH:mm", notNull(locale));
- java.util.Calendar cal = getComponent1AsCalendar();
- if (cal != null) {
- return df.format(cal.getTime()) + " " + tf.format(cal.getTime());
- }
+ //datetime: [YY]YYMMDDHHMM
+ java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale));
+ java.text.DateFormat tf = new java.text.SimpleDateFormat("HH:mm", notNull(locale));
+ java.util.Calendar cal = getComponent1AsCalendar();
+ if (cal != null) {
+ return df.format(cal.getTime()) + " " + tf.format(cal.getTime());
}
return null;
}
@@ -234,7 +229,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -419,6 +414,7 @@ public Field143 setEndDateTime(java.util.Calendar component1) {
* @return the list of converted components (a Calendar object or null)
* @since 9.2.7
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -497,7 +493,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field143(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field144.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field144.java
index 923e02d66..90af770f8 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field144.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field144.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 144");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field144 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Status Code content to set
- * @return the field object to enable build pattern
- */
- public Field144 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Status Code (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Status Code content to set
* @return the field object to enable build pattern
- * @see #setStatusCode(java.lang.Long)
*/
public Field144 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field144 setStatusCode(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Status Code (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Status Code content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field144 setStatusCode(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Status Code (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Status Code content to set
* @return the field object to enable build pattern
- * @see #setStatusCode(java.lang.Long)
*/
public Field144 setStatusCode(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field144(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14A.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14A.java
index 5824585e2..0fe6caa63 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14A.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14A.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14A");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14A(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14B.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14B.java
index 5b6130ac5..19695cf8f 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14B.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14B.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14B");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14B(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14C.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14C.java
index 638aed8b3..9780b5cb2 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14C.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14C.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14C");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field14C setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Year content to set
- * @return the field object to enable build pattern
- */
- public Field14C setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Year (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Year content to set
* @return the field object to enable build pattern
- * @see #setYear(java.lang.Long)
*/
public Field14C setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field14C setYear(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Year (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Year content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field14C setYear(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Year (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Year content to set
* @return the field object to enable build pattern
- * @see #setYear(java.lang.Long)
*/
public Field14C setYear(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14C(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14D.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14D.java
index d140cd364..ed8053330 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14D.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14D.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14D");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14D(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14E.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14E.java
index edd6fda1e..7c6ff7a89 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14E.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14E.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14E");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14E(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14F.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14F.java
index d18b5af7d..afc80ac19 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14F.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14F.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14F");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14F(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14G.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14G.java
index 74b4e290a..603e29021 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14G.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14G.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -220,11 +217,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -239,7 +234,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -482,7 +477,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14G(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14H.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14H.java
index 4389da7a3..4b79ee34d 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14H.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14H.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14H");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14H(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14J.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14J.java
index c1f9898cd..31985442f 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14J.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14J.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14J");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14J(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14K.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14K.java
index 78e81ca64..a2731ee1b 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14K.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14K.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14K");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14K(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14L.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14L.java
index e63deb482..e7f26bcb0 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14L.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14L.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14L");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14L(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14M.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14M.java
index 745c3d43c..5da9d8b1a 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14M.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14M.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14M");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14M(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14N.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14N.java
index 1c05f05d7..55357c953 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14N.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14N.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14N");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14N(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14O.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14O.java
index 2df65e579..4a7e703b1 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14O.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14O.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 14O");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14O(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field14S.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field14S.java
index 22d51802e..d9c635df6 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field14S.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field14S.java
@@ -32,12 +32,9 @@
import java.util.Calendar;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -267,11 +264,9 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
- if (component == 4) {
- //default format (as is)
- return getComponent(4);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(4);
}
/**
@@ -286,7 +281,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -553,32 +548,14 @@ public Field14S setComponent2(String component2) {
return this;
}
- /**
- * Set the component2 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent2(String)
- * method.
- *
- * @see #setComponent2(String)
- * @since 9.2.7
- *
- * @param component2 the Long with the Number content to set
- * @return the field object to enable build pattern
- */
- public Field14S setComponent2(java.lang.Long component2) {
- setComponent(2, SwiftFormatUtils.getLong(component2));
- return this;
- }
/**
* Alternative method setter for field's Number (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Number content to set
* @return the field object to enable build pattern
- * @see #setNumber(java.lang.Long)
*/
public Field14S setComponent2(java.lang.Number component2) {
@@ -608,27 +585,13 @@ public Field14S setNumber(String component2) {
return setComponent2(component2);
}
- /**
- * Set the Number (component 2) from a Long object.
- *
- * @see #setComponent2(java.lang.Long)
- *
- * @param component2 Long with the Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field14S setNumber(java.lang.Long component2) {
- return setComponent2(component2);
- }
-
/**
* Alternative method setter for field's Number (component 2) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component2 the Number with the Number content to set
* @return the field object to enable build pattern
- * @see #setNumber(java.lang.Long)
*/
public Field14S setNumber(java.lang.Number component2) {
return setComponent2(component2);
@@ -764,7 +727,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field14S(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field151.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field151.java
index 5e867942a..6b6c86829 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field151.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field151.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 151");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field151 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Session Number content to set
- * @return the field object to enable build pattern
- */
- public Field151 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Session Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Session Number content to set
* @return the field object to enable build pattern
- * @see #setSessionNumber(java.lang.Long)
*/
public Field151 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field151 setSessionNumber(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Session Number (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Session Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field151 setSessionNumber(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Session Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Session Number content to set
* @return the field object to enable build pattern
- * @see #setSessionNumber(java.lang.Long)
*/
public Field151 setSessionNumber(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field151(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field152.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field152.java
index 233c4e491..691dbf446 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field152.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field152.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 152");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field152 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Sequence Number content to set
- * @return the field object to enable build pattern
- */
- public Field152 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Sequence Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Sequence Number content to set
* @return the field object to enable build pattern
- * @see #setSequenceNumber(java.lang.Long)
*/
public Field152 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field152 setSequenceNumber(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Sequence Number (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Sequence Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field152 setSequenceNumber(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Sequence Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Sequence Number content to set
* @return the field object to enable build pattern
- * @see #setSequenceNumber(java.lang.Long)
*/
public Field152 setSequenceNumber(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field152(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field153.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field153.java
index 396952f7c..1b9f7ce28 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field153.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field153.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 153");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field153 setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Sequence Number content to set
- * @return the field object to enable build pattern
- */
- public Field153 setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Sequence Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Sequence Number content to set
* @return the field object to enable build pattern
- * @see #setSequenceNumber(java.lang.Long)
*/
public Field153 setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field153 setSequenceNumber(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Sequence Number (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Sequence Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field153 setSequenceNumber(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Sequence Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Sequence Number content to set
* @return the field object to enable build pattern
- * @see #setSequenceNumber(java.lang.Long)
*/
public Field153 setSequenceNumber(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field153(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15A.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15A.java
index 3cb2254f1..5cc77e562 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15A.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15A.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15A");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15A(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15A fromJson(final String json) {
- final Field15A field = new Field15A();
-
-
- return field;
+ return new Field15A();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15B.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15B.java
index 43afdd9ae..6777eaf40 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15B.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15B.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15B");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15B(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15B fromJson(final String json) {
- final Field15B field = new Field15B();
-
-
- return field;
+ return new Field15B();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15C.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15C.java
index 48827bf76..02968b461 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15C.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15C.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15C");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15C(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15C fromJson(final String json) {
- final Field15C field = new Field15C();
-
-
- return field;
+ return new Field15C();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15D.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15D.java
index c58922698..82ad2d5af 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15D.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15D.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15D");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15D(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15D fromJson(final String json) {
- final Field15D field = new Field15D();
-
-
- return field;
+ return new Field15D();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15E.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15E.java
index 667bceaf6..639e8ce39 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15E.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15E.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15E");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15E(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15E fromJson(final String json) {
- final Field15E field = new Field15E();
-
-
- return field;
+ return new Field15E();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15F.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15F.java
index 0711f6158..2279132ac 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15F.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15F.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15F");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15F(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15F fromJson(final String json) {
- final Field15F field = new Field15F();
-
-
- return field;
+ return new Field15F();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15G.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15G.java
index 416a21cf3..4da34fba9 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15G.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15G.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15G");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15G(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15G fromJson(final String json) {
- final Field15G field = new Field15G();
-
-
- return field;
+ return new Field15G();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15H.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15H.java
index 28b0e7e03..4b91346d3 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15H.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15H.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15H");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15H(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15H fromJson(final String json) {
- final Field15H field = new Field15H();
-
-
- return field;
+ return new Field15H();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15I.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15I.java
index 7b899fc6a..66a2de441 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15I.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15I.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15I");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15I(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15I fromJson(final String json) {
- final Field15I field = new Field15I();
-
-
- return field;
+ return new Field15I();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15J.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15J.java
index 4b432d205..78101daed 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15J.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15J.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15J");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15J(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15J fromJson(final String json) {
- final Field15J field = new Field15J();
-
-
- return field;
+ return new Field15J();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15K.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15K.java
index a158eabe0..a026968d3 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15K.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15K.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15K");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15K(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15K fromJson(final String json) {
- final Field15K field = new Field15K();
-
-
- return field;
+ return new Field15K();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15L.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15L.java
index dfa8f785c..9cbfd59d7 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15L.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15L.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15L");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15L(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15L fromJson(final String json) {
- final Field15L field = new Field15L();
-
-
- return field;
+ return new Field15L();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15M.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15M.java
index 7942e4abd..7a2da7e56 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15M.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15M.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15M");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15M(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15M fromJson(final String json) {
- final Field15M field = new Field15M();
-
-
- return field;
+ return new Field15M();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15N.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15N.java
index 7c9068912..3006803e7 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15N.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15N.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15N");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15N(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15N fromJson(final String json) {
- final Field15N field = new Field15N();
-
-
- return field;
+ return new Field15N();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15O.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15O.java
index 3b1247928..563449c94 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15O.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15O.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15O");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15O(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15O fromJson(final String json) {
- final Field15O field = new Field15O();
-
-
- return field;
+ return new Field15O();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field15P.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field15P.java
index 43e72fff7..1d023f935 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field15P.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field15P.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -199,14 +196,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 15P");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -221,7 +215,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -404,7 +398,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field15P(f));
}
@@ -419,13 +413,11 @@ public static List getAll(final SwiftTagListBlock block) {
* @since 7.10.3
* @see Field#fromJson(String)
*/
+ @SuppressWarnings("unused")
public static Field15P fromJson(final String json) {
- final Field15P field = new Field15P();
-
-
- return field;
+ return new Field15P();
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field165.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field165.java
index 7c7042bad..76f8d9d0f 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field165.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field165.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -221,11 +218,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
- if (component == 2) {
- //default format (as is)
- return getComponent(2);
- }
- return null;
+ // This is the last component, return directly without `if`
+ //default format (as is)
+ return getComponent(2);
}
/**
@@ -240,7 +235,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -483,7 +478,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field165(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field16A.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field16A.java
index fe186f556..feeeb084f 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field16A.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field16A.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 16A");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field16A setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Number content to set
- * @return the field object to enable build pattern
- */
- public Field16A setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number content to set
* @return the field object to enable build pattern
- * @see #setNumber(java.lang.Long)
*/
public Field16A setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field16A setNumber(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Number (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field16A setNumber(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number content to set
* @return the field object to enable build pattern
- * @see #setNumber(java.lang.Long)
*/
public Field16A setNumber(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field16A(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field16C.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field16C.java
index ac786a9a8..27a294eec 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field16C.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field16C.java
@@ -31,12 +31,9 @@
import java.math.BigInteger;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 16C");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -228,7 +222,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -394,32 +388,14 @@ public Field16C setComponent1(String component1) {
return this;
}
- /**
- * Set the component1 from a Long object.
- *
- * If the component being set is a fixed length number, the argument will not be
- * padded. It is recommended for these cases to use the setComponent1(String)
- * method.
- *
- * @see #setComponent1(String)
- * @since 9.2.7
- *
- * @param component1 the Long with the Number content to set
- * @return the field object to enable build pattern
- */
- public Field16C setComponent1(java.lang.Long component1) {
- setComponent(1, SwiftFormatUtils.getLong(component1));
- return this;
- }
/**
* Alternative method setter for field's Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number content to set
* @return the field object to enable build pattern
- * @see #setNumber(java.lang.Long)
*/
public Field16C setComponent1(java.lang.Number component1) {
@@ -449,27 +425,13 @@ public Field16C setNumber(String component1) {
return setComponent1(component1);
}
- /**
- * Set the Number (component 1) from a Long object.
- *
- * @see #setComponent1(java.lang.Long)
- *
- * @param component1 Long with the Number content to set
- * @return the field object to enable build pattern
- * @since 9.2.7
- */
- public Field16C setNumber(java.lang.Long component1) {
- return setComponent1(component1);
- }
-
/**
* Alternative method setter for field's Number (component 1) as Number
- *
+ *
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number content to set
* @return the field object to enable build pattern
- * @see #setNumber(java.lang.Long)
*/
public Field16C setNumber(java.lang.Number component1) {
return setComponent1(component1);
@@ -540,7 +502,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field16C(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field16R.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field16R.java
index 111a0e36c..b4b9e2541 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field16R.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field16R.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 16R");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field16R(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field16S.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field16S.java
index e14f208f6..3454f030b 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field16S.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field16S.java
@@ -29,12 +29,9 @@
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 16S");
}
- if (component == 1) {
- //default format (as is)
- return getComponent(1);
- }
- return null;
+ //default format (as is)
+ return getComponent(1);
}
/**
@@ -226,7 +220,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
@@ -429,7 +423,7 @@ public static List getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
- if (arr != null && arr.length > 0) {
+ if (arr != null) {
for (final Tag f : arr) {
result.add(new Field16S(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field171.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field171.java
index b7bb4c110..b082c3a8e 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field171.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field171.java
@@ -32,12 +32,9 @@
import com.prowidesoftware.swift.model.field.DateContainer;
import com.prowidesoftware.swift.model.field.DateResolver;
-import org.apache.commons.lang3.StringUtils;
-
-import com.prowidesoftware.swift.model.field.SwiftParseUtils;
-import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
+import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -207,16 +204,14 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
- if (component < 1 || component > 1) {
+ if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 171");
}
- if (component == 1) {
- //date: [YY]YYMMDD
- java.text.DateFormat f = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale));
- java.util.Calendar cal = getComponent1AsCalendar();
- if (cal != null) {
- return f.format(cal.getTime());
- }
+ //date: [YY]YYMMDD
+ java.text.DateFormat f = java.text.DateFormat.getDateInstance(java.text.DateFormat.DEFAULT, notNull(locale));
+ java.util.Calendar cal = getComponent1AsCalendar();
+ if (cal != null) {
+ return f.format(cal.getTime());
}
return null;
}
@@ -233,7 +228,7 @@ public String componentsPattern() {
/**
* Returns the field component types pattern.
- *
+ *