diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1787fb04..f9ba1d66b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
#### 9.5.2 - SNAPSHOT
* Added new `FieldEnum` with all the available field names
+ * Code security improvements as per CodeQL recommendations
#### 9.5.1 - June 2024
* (PW-1913) Added IBAN validation for Egypt local account structure
diff --git a/build.gradle b/build.gradle
index 1315add82..8f023a9a8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -60,6 +60,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.10.2'
testImplementation 'org.assertj:assertj-core:3.25.3'
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 1b6e6e9e5..26b879d90 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 0c9353677..b31b6af47 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;
@@ -184,19 +181,16 @@ 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);
}
/**
* 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
@@ -439,7 +433,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 b91ccd9c2..ea8b8698f 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 7f85ec7e8..ea3a130b3 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 146e2f42c..f9d841492 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 d61d34e27..dda04a655 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 b8215f397..4a260c048 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 e83bd1c46..ebed16145 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 43b4c4425..36af0d751 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;
@@ -227,16 +224,14 @@ 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);
}
/**
* 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
@@ -540,6 +535,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);
}
@@ -617,7 +613,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 ab3400db2..9832c047f 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 9749de18a..543957872 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 c3b63708d..52327306a 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 2ad87b636..5e167ec86 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 0ccf406ba..e6e3d8b8d 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 ad0058e3c..4f3937c71 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -438,7 +432,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 8ba98f10d..39904866e 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 640ba3112..276b2ec0d 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -438,7 +432,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 48b4887d3..414de82d5 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 2624b21ea..c99224c6c 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;
@@ -205,16 +202,14 @@ 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);
}
/**
* 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
@@ -436,26 +431,32 @@ public Field11A setCurrencyCode(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);
}
@@ -467,6 +468,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;
}
@@ -477,6 +479,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -491,6 +494,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);
}
@@ -558,7 +562,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 34945fbd3..98e86287c 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;
@@ -253,16 +250,14 @@ 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);
}
/**
* 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
@@ -576,32 +571,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) {
@@ -631,27 +608,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);
@@ -668,32 +631,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) {
@@ -723,27 +668,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);
@@ -755,6 +686,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);
}
@@ -832,7 +764,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));
}
@@ -848,6 +780,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);
}
@@ -861,6 +794,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);
@@ -873,6 +807,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());
}
@@ -885,6 +820,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));
@@ -899,6 +835,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);
}
@@ -913,6 +850,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 bf83d1ce3..00925e61d 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;
@@ -253,16 +250,14 @@ 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);
}
/**
* 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
@@ -576,32 +571,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) {
@@ -631,27 +608,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);
@@ -668,32 +631,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) {
@@ -723,27 +668,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);
@@ -755,6 +686,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);
}
@@ -832,7 +764,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));
}
@@ -848,6 +780,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);
}
@@ -861,6 +794,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);
@@ -873,6 +807,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());
}
@@ -885,6 +820,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));
@@ -899,6 +835,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);
}
@@ -913,6 +850,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 fafe34a06..eb5104eeb 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 67a303816..6692df42c 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 9f9504566..3d56a147f 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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/Field123.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field123.java
index 9c34dec87..babfb7574 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 1fc2a5ff2..b12be4cd2 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -400,7 +394,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 cdaf9b3d1..616e89a4e 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 7807ed5d7..14ed9e302 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 ed1baa3b1..188fc6071 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 eb10e16f2..60d82606b 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;
@@ -202,16 +199,14 @@ 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);
}
/**
* 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
@@ -430,10 +425,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);
}
@@ -502,7 +499,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 c7a30f125..99103657b 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;
@@ -201,16 +198,14 @@ 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);
}
/**
* 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
@@ -395,32 +390,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) {
@@ -450,27 +427,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);
@@ -487,32 +450,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) {
@@ -542,27 +487,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);
@@ -633,7 +564,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 194a006b6..8afb8d109 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;
@@ -215,16 +212,14 @@ 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);
}
/**
* 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 Field12A setInstrumentCodeOrDescription(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();
}
@@ -466,6 +462,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return getComponent2() != null;
}
@@ -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 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 b27d7b599..a5540feeb 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;
@@ -220,16 +217,14 @@ 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);
}
/**
* 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
@@ -472,6 +467,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();
}
@@ -482,6 +478,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return getComponent2() != null;
}
@@ -496,6 +493,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);
}
@@ -563,7 +561,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 ae6c2facb..0384d16b3 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;
@@ -201,16 +198,14 @@ 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);
}
/**
* 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
@@ -396,6 +391,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;
}
@@ -406,6 +402,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -420,6 +417,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);
}
@@ -487,7 +485,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 471904dbe..49cfa25d7 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 06ed5c222..214f09392 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;
@@ -190,19 +187,16 @@ 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);
}
/**
* 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
@@ -422,7 +416,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 924224969..5d139277a 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 bf02eb2fe..14ab84928 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 a262580f3..a9963d7f8 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;
@@ -237,16 +234,14 @@ 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);
}
/**
* 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,32 +464,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) {
@@ -524,27 +501,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);
@@ -582,32 +545,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) {
@@ -637,27 +582,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);
@@ -749,7 +680,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));
}
@@ -765,6 +696,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);
}
@@ -778,6 +710,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);
@@ -790,6 +723,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());
}
@@ -802,6 +736,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));
@@ -816,6 +751,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);
}
@@ -830,6 +766,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 6b6b1fe6b..1b9973ba5 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;
@@ -199,16 +196,14 @@ 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);
}
/**
* 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
@@ -398,32 +393,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) {
@@ -453,27 +430,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);
@@ -544,7 +507,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 53dc8ba49..28e763067 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;
@@ -234,16 +231,14 @@ 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);
}
/**
* 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,32 +505,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) {
@@ -565,27 +542,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);
@@ -656,7 +619,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 2b821acff..da48104a4 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;
@@ -219,16 +216,14 @@ 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);
}
/**
* 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
@@ -487,10 +482,12 @@ public Field134 setBroadcastRequesterCity(String component3) {
}
+ @Override
public List bics() {
return BICResolver.bics(this);
}
+ @Override
public List bicStrings () {
return BICResolver.bicStrings(this);
}
@@ -559,7 +556,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));
}
@@ -575,6 +572,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);
}
@@ -588,6 +586,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);
@@ -600,6 +599,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());
}
@@ -612,6 +612,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));
@@ -626,6 +627,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);
}
@@ -640,6 +642,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 be63e08c5..1127e90d5 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 cd5b69816..bfec6216f 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;
@@ -199,16 +196,14 @@ 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);
}
/**
* 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
@@ -395,32 +390,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) {
@@ -450,27 +427,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);
@@ -541,7 +504,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 fe7b6a43e..d8656223c 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;
@@ -234,16 +231,14 @@ 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);
}
/**
* 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,32 +505,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) {
@@ -565,27 +542,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);
@@ -656,7 +619,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 ac02ad16d..8a8f0546c 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;
@@ -207,16 +204,14 @@ 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);
}
/**
* 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
@@ -416,6 +411,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;
}
@@ -426,6 +422,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -440,6 +437,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);
}
@@ -507,7 +505,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 8a44ae3e8..72ca6e9ae 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;
@@ -214,16 +211,14 @@ 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);
}
/**
* 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
@@ -452,6 +447,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();
}
@@ -462,6 +458,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return getComponent2() != null;
}
@@ -476,6 +473,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);
}
@@ -543,7 +541,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 b1a11cb93..29a8393e5 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;
@@ -240,16 +237,14 @@ 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);
}
/**
* 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
@@ -658,7 +653,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 0e8011435..e64f566ba 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;
@@ -240,16 +237,14 @@ 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);
}
/**
* 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
@@ -633,6 +628,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);
}
@@ -710,7 +706,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 3590d9014..08df0b000 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;
@@ -202,16 +199,14 @@ 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);
}
/**
* 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
@@ -400,6 +395,7 @@ public Field13J setExtendedNumberId(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;
}
@@ -410,6 +406,7 @@ public String getDSS() {
* @see #getDSS()
* @return true if DSS is present, false otherwise.
*/
+ @Override
public boolean isDSSPresent() {
return false;
}
@@ -424,6 +421,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);
}
@@ -491,7 +489,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/Field140.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field140.java
index 3903e4500..216ca00e6 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 0467d35f2..ce64f645b 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 72f2e301c..8df1ada30 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;
@@ -186,24 +183,22 @@ 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;
}
/**
* 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
@@ -388,6 +383,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);
}
@@ -466,7 +462,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 1e16c485f..b7319cfb6 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;
@@ -186,24 +183,22 @@ 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;
}
/**
* 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
@@ -388,6 +383,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);
}
@@ -466,7 +462,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 412ff9eed..c90950d75 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 eb156902f..05c813497 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 576402971..1ac403847 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 a5456ad34..7920253ed 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 c4c9aeb40..829f07d31 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 4012a6482..772714f23 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 af55e79de..e7fded607 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 198f160d0..e68f84bf7 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;
@@ -199,16 +196,14 @@ 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);
}
/**
* 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,7 +446,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 31b724c99..c80091052 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 19daf2fd2..954d34a6f 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 c6d74f863..af027ccaf 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 93fb4fd6e..0e714650e 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 3eda899b4..0b4afa30a 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 f82b595e1..cf8a60922 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 0cb605d46..883e7fa42 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 e4b2bde3b..94cc2d880 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;
@@ -246,16 +243,14 @@ 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);
}
/**
* 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
@@ -503,32 +498,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) {
@@ -558,27 +535,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);
@@ -714,7 +677,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 30eef70b5..ad44fd5bb 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 b12a95635..3b5ebb8cb 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 905f8601b..8e57d3821 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 70eba0414..53d3b95e5 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 033496fb6..a77b075a1 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 24210a01e..0c0943cc2 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 2bf0e6dd8..66a489c11 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 a2b3553f4..1fee666d6 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 aa8f10821..063aa6da2 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 c7828cf86..e7833cd81 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 a90055a64..52fdf6d01 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 03c35c256..f52cf252c 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 0dcb171a5..2fe1fbbe0 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 50449c156..fd001d10a 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 aa56becf2..96a162f21 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 3eaf3ba97..559dfca1f 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 34849dd8d..b9fd718d9 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 1762eb21d..405c21ac4 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 c3ce40718..07661a1ab 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;
@@ -178,19 +175,16 @@ 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);
}
/**
* 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
@@ -373,7 +367,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));
}
@@ -388,13 +382,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 aa9b35c0b..c17109bf2 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;
@@ -200,16 +197,14 @@ 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);
}
/**
* 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
@@ -452,7 +447,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 f1a51e675..d4280e342 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 9d27d73f1..87f97c80b 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;
@@ -185,19 +182,16 @@ 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);
}
/**
* 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
@@ -344,32 +338,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) {
@@ -399,27 +375,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);
@@ -490,7 +452,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 36acac41f..c3947d586 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 51bacea0e..3592cc8c2 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;
@@ -183,19 +180,16 @@ 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);
}
/**
* 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
@@ -398,7 +392,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 869be3469..c6f3bf38a 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;
@@ -186,23 +183,21 @@ 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;
}
/**
* 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
@@ -386,6 +381,7 @@ public Field171 setDate(java.util.Calendar component1) {
*
* @return the list of converted components (a Calendar object or null)
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -463,7 +459,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 Field171(f));
}
diff --git a/src/generated/java/com/prowidesoftware/swift/model/field/Field172.java b/src/generated/java/com/prowidesoftware/swift/model/field/Field172.java
index afddfa1c7..2e6f7fed0 100644
--- a/src/generated/java/com/prowidesoftware/swift/model/field/Field172.java
+++ b/src/generated/java/com/prowidesoftware/swift/model/field/Field172.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;
@@ -210,20 +207,19 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
- if (component == 2) {
- //month and day: MMDD
- java.text.DateFormat f = new java.text.SimpleDateFormat("MMM dd", notNull(locale));
- java.util.Calendar cal = getComponent2AsCalendar();
- if (cal != null) {
- return f.format(cal.getTime());
- }
+ // This is the last component, return directly without `if`
+ //month and day: MMDD
+ java.text.DateFormat f = new java.text.SimpleDateFormat("MMM dd", notNull(locale));
+ java.util.Calendar cal = getComponent2AsCalendar();
+ if (cal != null) {
+ return f.format(cal.getTime());
}
return null;
}
/**
* 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
@@ -488,6 +484,7 @@ public Field172 setEndDate(java.util.Calendar component2) {
* @return the list of converted components (a Calendar object or null)
* @since 9.2.7
*/
+ @Override
public List dates() {
return DateResolver.dates(this);
}
@@ -566,7 +563,7 @@ public static List