You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/12/28 16:40:35 UTC

(commons-validator) 01/04: Javadoc

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git

commit 6801b44fd54bcc78b29eb47dbdf01a782a99f836
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sat Dec 28 11:37:55 2024 -0500

    Javadoc
---
 .../java/org/apache/commons/validator/Arg.java     | 24 +++++++++++++++++++---
 .../java/org/apache/commons/validator/Field.java   |  7 +++++++
 .../java/org/apache/commons/validator/Form.java    |  7 +++++++
 .../java/org/apache/commons/validator/FormSet.java |  7 +++++++
 .../apache/commons/validator/FormSetFactory.java   |  7 +++++++
 .../java/org/apache/commons/validator/Msg.java     |  7 +++++++
 .../apache/commons/validator/ValidatorAction.java  |  7 +++++++
 .../apache/commons/validator/ValidatorResults.java |  7 +++++++
 .../commons/validator/routines/ISSNValidator.java  |  7 +++++++
 .../validator/routines/InetAddressValidator.java   |  7 +++++++
 .../routines/checkdigit/ISBNCheckDigit.java        |  7 +++++++
 .../routines/checkdigit/VerhoeffCheckDigit.java    |  7 +++++++
 12 files changed, 98 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/validator/Arg.java b/src/main/java/org/apache/commons/validator/Arg.java
index f57945b0..e65ebec1 100644
--- a/src/main/java/org/apache/commons/validator/Arg.java
+++ b/src/main/java/org/apache/commons/validator/Arg.java
@@ -70,6 +70,13 @@ public class Arg implements Cloneable, Serializable {
      */
     protected boolean resource = true;
 
+    /**
+     * Constructs a new instance.
+     */
+    public Arg() {
+        // empty
+    }
+
     /**
      * Creates and returns a copy of this object.
      * @return A copy of this object.
@@ -84,7 +91,8 @@ public class Arg implements Cloneable, Serializable {
     }
 
     /**
-     * Returns the resource bundle name.
+     * Gets the resource bundle name.
+     *
      * @return the bundle name.
      * @since 1.1
      */
@@ -94,6 +102,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Gets the key/value.
+     *
      * @return the key value.
      */
     public String getKey() {
@@ -102,6 +111,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Gets the name of the dependency.
+     *
      * @return the name of the dependency.
      */
     public String getName() {
@@ -109,8 +119,9 @@ public class Arg implements Cloneable, Serializable {
     }
 
     /**
-     * Argument's replacement position.
-     * @return This argument's replacement position.
+     * Gets the replacement position.
+     *
+     * @return This replacement position.
      */
     public int getPosition() {
         return position;
@@ -118,6 +129,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Tests whether or not the key is a resource key or literal value.
+     *
      * @return {@code true} if key is a resource key.
      */
     public boolean isResource() {
@@ -126,6 +138,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Sets the resource bundle name.
+     *
      * @param bundle The new bundle name.
      * @since 1.1
      */
@@ -135,6 +148,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Sets the key/value.
+     *
      * @param key They to access the argument.
      */
     public void setKey(final String key) {
@@ -143,6 +157,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Sets the name of the dependency.
+     *
      * @param name the name of the dependency.
      */
     public void setName(final String name) {
@@ -151,6 +166,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Sets this argument's replacement position.
+     *
      * @param position set this argument's replacement position.
      */
     public void setPosition(final int position) {
@@ -159,6 +175,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Sets whether or not the key is a resource.
+     *
      * @param resource If true indicates the key is a resource.
      */
     public void setResource(final boolean resource) {
@@ -167,6 +184,7 @@ public class Arg implements Cloneable, Serializable {
 
     /**
      * Returns a string representation of the object.
+     *
      * @return a string representation of the object.
      */
     @Override
diff --git a/src/main/java/org/apache/commons/validator/Field.java b/src/main/java/org/apache/commons/validator/Field.java
index cf807a29..e6d88acf 100644
--- a/src/main/java/org/apache/commons/validator/Field.java
+++ b/src/main/java/org/apache/commons/validator/Field.java
@@ -146,6 +146,13 @@ public class Field implements Cloneable, Serializable {
     @SuppressWarnings("unchecked") // cannot instantiate generic array, so have to assume this is OK
     protected Map<String, Arg>[] args = new Map[0];
 
+    /**
+     * Constructs a new instance.
+     */
+    public Field() {
+        // empty
+    }
+
     /**
      * Add an {@code Arg} to the replacement argument list.
      * @since 1.1
diff --git a/src/main/java/org/apache/commons/validator/Form.java b/src/main/java/org/apache/commons/validator/Form.java
index 605c08ad..9ef42303 100644
--- a/src/main/java/org/apache/commons/validator/Form.java
+++ b/src/main/java/org/apache/commons/validator/Form.java
@@ -72,6 +72,13 @@ public class Form implements Serializable {
      */
     private boolean processed;
 
+    /**
+     * Constructs a new instance.
+     */
+    public Form() {
+        // empty
+    }
+
     /**
      * Add a {@code Field} to the {@code Form}.
      *
diff --git a/src/main/java/org/apache/commons/validator/FormSet.java b/src/main/java/org/apache/commons/validator/FormSet.java
index d76608a0..39407e34 100644
--- a/src/main/java/org/apache/commons/validator/FormSet.java
+++ b/src/main/java/org/apache/commons/validator/FormSet.java
@@ -94,6 +94,13 @@ public class FormSet implements Serializable {
      */
     private boolean merged;
 
+    /**
+     * Constructs a new instance.
+     */
+    public FormSet() {
+        // empty
+    }
+
     /**
      * Add a {@code Constant} to the locale level.
      *
diff --git a/src/main/java/org/apache/commons/validator/FormSetFactory.java b/src/main/java/org/apache/commons/validator/FormSetFactory.java
index 4fe30d41..34a544fe 100644
--- a/src/main/java/org/apache/commons/validator/FormSetFactory.java
+++ b/src/main/java/org/apache/commons/validator/FormSetFactory.java
@@ -31,6 +31,13 @@ public class FormSetFactory extends AbstractObjectCreationFactory {
     /** Logging */
     private transient Log log = LogFactory.getLog(FormSetFactory.class);
 
+    /**
+     * Constructs a new instance.
+     */
+    public FormSetFactory() {
+        // empty
+    }
+
     /**
      * <p>Create or retrieve a {@code FormSet} based on the language, country
      *    and variant.</p>
diff --git a/src/main/java/org/apache/commons/validator/Msg.java b/src/main/java/org/apache/commons/validator/Msg.java
index ee467251..39b77e55 100644
--- a/src/main/java/org/apache/commons/validator/Msg.java
+++ b/src/main/java/org/apache/commons/validator/Msg.java
@@ -54,6 +54,13 @@ public class Msg implements Cloneable, Serializable {
      */
     protected boolean resource = true;
 
+    /**
+     * Constructs a new instance.
+     */
+    public Msg() {
+        // empty
+    }
+
     /**
      * Creates and returns a copy of this object.
      * @return A copy of the Msg.
diff --git a/src/main/java/org/apache/commons/validator/ValidatorAction.java b/src/main/java/org/apache/commons/validator/ValidatorAction.java
index d08edb8b..0f1bbd90 100644
--- a/src/main/java/org/apache/commons/validator/ValidatorAction.java
+++ b/src/main/java/org/apache/commons/validator/ValidatorAction.java
@@ -134,6 +134,13 @@ public class ValidatorAction implements Serializable {
      */
     private final List<String> methodParameterList = new ArrayList<>();
 
+    /**
+     * Constructs a new instance.
+     */
+    public ValidatorAction() {
+        // empty
+    }
+
     /**
      * Dynamically runs the validation method for this validator and returns true if the data is valid.
      *
diff --git a/src/main/java/org/apache/commons/validator/ValidatorResults.java b/src/main/java/org/apache/commons/validator/ValidatorResults.java
index 80444ba9..a8c456bd 100644
--- a/src/main/java/org/apache/commons/validator/ValidatorResults.java
+++ b/src/main/java/org/apache/commons/validator/ValidatorResults.java
@@ -37,6 +37,13 @@ public class ValidatorResults implements Serializable {
      */
     protected Map<String, ValidatorResult> hResults = new HashMap<>();
 
+    /**
+     * Constructs a new instance.
+     */
+    public ValidatorResults() {
+        // empty
+    }
+
     /**
      * Add a the result of a validator action.
      *
diff --git a/src/main/java/org/apache/commons/validator/routines/ISSNValidator.java b/src/main/java/org/apache/commons/validator/routines/ISSNValidator.java
index 0c401d38..36a125dc 100644
--- a/src/main/java/org/apache/commons/validator/routines/ISSNValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/ISSNValidator.java
@@ -91,6 +91,13 @@ public class ISSNValidator implements Serializable {
         return ISSN_VALIDATOR;
     }
 
+    /**
+     * Constructs a new instance.
+     */
+    public ISSNValidator() {
+        // empty
+    }
+
     /**
      * Converts an ISSN code to an EAN-13 code.
      * <p>
diff --git a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
index 914b7d63..b6aa44af 100644
--- a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
@@ -77,6 +77,13 @@ public class InetAddressValidator implements Serializable {
         return VALIDATOR;
     }
 
+    /**
+     * Constructs a new instance.
+     */
+    public InetAddressValidator() {
+        // empty
+    }
+
     /**
      * Checks if the specified string is a valid IPv4 or IPv6 address.
      *
diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigit.java
index a3d99bde..b12a35e3 100644
--- a/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigit.java
+++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigit.java
@@ -48,6 +48,13 @@ public final class ISBNCheckDigit extends AbstractCheckDigit implements Serializ
     /** Singleton combined ISBN-10 / ISBN-13 Check Digit instance */
     public static final CheckDigit ISBN_CHECK_DIGIT = new ISBNCheckDigit();
 
+    /**
+     * Constructs a new instance.
+     */
+    public ISBNCheckDigit() {
+        // empty
+    }
+
     /**
      * Calculate an ISBN-10 or ISBN-13 check digit, depending
      * on the length of the code.
diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/VerhoeffCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/VerhoeffCheckDigit.java
index 7cc96afb..5b1a1d74 100644
--- a/src/main/java/org/apache/commons/validator/routines/checkdigit/VerhoeffCheckDigit.java
+++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/VerhoeffCheckDigit.java
@@ -66,6 +66,13 @@ public final class VerhoeffCheckDigit extends AbstractCheckDigit implements Seri
     /** Inverse table */
     private static final int[] INV_TABLE = {0, 4, 3, 2, 1, 5, 6, 7, 8, 9};
 
+    /**
+     * Constructs a new instance.
+     */
+    public VerhoeffCheckDigit() {
+        // empty
+    }
+
     /**
      * Calculate a Verhoeff <em>Check Digit</em> for a code.
      *