Class RJArrBoxedConsumerRec


  • public class RJArrBoxedConsumerRec
    extends java.lang.Object
    RJArrBoxedConsumerRec 🠞
    • RJArr - Read JsonArray
      This class is a helper class, used for reading data directly from an already parsed JsonArray instance.

    • BoxedConsumer - Data is sent to a Java-Consumer of a Boxed-Primitive Type.

    • Rec - The methods in this class produce a pre-configured SettingsRec instance. Re-using a Configuration-Record can speed up processing when more than one JsonArray needs to be handled. This record should be used in conjunction with the class ProcessJsonArray to process multiple JsonArray's, efficiently.
    Generate a Pre-Configured SettingsRec instance which can handle Java Boxed-Primitives.

    This class builds on the J2EE Standard 'Glass-Fish' JSON Processor

    There are several JSON Parsers available, and even more implementations for serializing and de-serializing data to/from JSON. The tool included in the J2EE is available on GitHub, and that is the one used by the Java HTML JAR Library. (See: javax.json.* )

    Primary Classes Used: JsonArray and JsonObject


    This class generates the Pre-Packaged, Pre-Configured SettingsRec instances that may be used to optimize loops. Use the records that are produced by the methods in this class in conjunction with the class ProcessJsonArray to (more efficiently) process Multiple JsonArray's with similar characteristics.


    Optimize Loops:
    For each method within this class, there are actually two different variants of what is, essentially, the exact same method. Methods in this class whose name ends with the letters 'Rec' are methods that will produce what is known as a 'Settings Record', (see class SettingsRec<T, U>).

    Every one of the Json-Processing classes (in this Json Java-Package) that begin with the letters 'RJArr' are classes which iterate JsonArray's. First, the class does some form of processing and testing to ensure that the contents of the arrays are properly converted into standard Java-Types. After the elements of a JsonArray are successfully processed, they are then sent to either a Java-Array, a Stream or a User-Provided Consumer.

    In order to guarantee that there is a homogenous algorithm for processing these array indices, only four Java 'for-loops' have actually been written. (These loops may be easily inspected by clicking on the 'Hi-Lited Source-Code' button inside of class ProcessJsonArray). In this class, in order to differentiate between a JsonArray which is to be converted into a Java int[]-Array, and one which is to be placed into a Java long[]-Array, a particular "Settings Record" is constructed (which "configures" the loop's body).

    If only one invocation of a method is needed, then using the method that ends with 'Arr' should be perfectly sufficient! If the methods in this class are going to be invoked from inside of a loop (or invoked many times), then it would be much wiser to, first, obtain an instance of the SettingsRec, and then invoke the Array-Processing code yourself.

    In this way, generating twice as many short-lived, ephemeral, object instances (that are immediately discarded, and then collected by the Garbage-Collector) can be avoided. To do this is quite simple. Please review the documentation for the methods in this class whose name ends with 'Rec' - and look at the example code provided for how to use them.

    The Loop Optimized variants of the methods in this class are, very simple, two step procedures (as opposed to just a single method invocation).

    1. First, generate an instance of the SettingsRec class. Make sure to heed to Generic-Type Parameters returned by the Settings-Record Generator-Method you have called.

    2. Second, simply call the specified Json-Array Processing method from class ProcessJsonArray



    Method Parameters

    Parameter Explanation
    <PRIMITIVE> defaultValue When an appropriate JFlag-Value is included in the mask, this Default-Value will be passed to the User-Provided Consumer in whichever Error-Circumstance has occured (as per the Flag-Value Name).

    This Default-Value may be requested through JFlag-Values such as: RD_AEX, RD_IOB and RD_M (among others). The 'RD' in these Flag's Names is an abbreviation for "Return Default-Value".

    The Complete List of Flags which request that this Default-Value Parameter be employed under various Error-Circumstances may be viewed in the following link. The name of each of these flags attempts identify the type of Error-Situation to which it may be applied.

    Default-Value Flags
    int FLAGS A Bit-Wise Flag-Mask that provides a means for configuring the Array-Processing Logic to properly handle several types of Error-Cases & potentatial, unexpected, array contents.

    A Flag-Mask of '0' requests that any Error-Situations which occur, should they crop up while processing the array, be handled by standard means - meaning by throwing one of the germaine Exception-Class.
    Function
    <String, BOXED_TYPE>
    optionalUserParser
    This parameter can only serve a purpose when it is used in conjunction with a JFlag-Vaule which explicity requests that Java String-Values be handled by a parser (rather than causing an exception to throw).

    The two flags which may be employed to signal this Handler-Behavior are: RETURN_PARSE_ON_STR and RP_S (the latter being merely the abbreviated variant of the former).

    If neither of these flags have been AND'ed into the Flag-Mask parameter ("FLAGS"), then any function which is passed to this parameter ("optionalUserParser") is wholly ignored - simply because using a String-Parser is not a "Default Behavior of this class' Array-Processing Logic.
    See Also:
    Json, JsonArray



    Stateless Class:
    This class neither contains any program-state, nor can it be instantiated. The @StaticFunctional Annotation may also be called 'The Spaghetti Report'. Static-Functional classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's @Stateless Annotation.

    • 1 Constructor(s), 1 declared private, zero-argument constructor
    • 16 Method(s), 16 declared static
    • 0 Field(s)


    • Method Summary

       
      Generate a SettingsRec Instance which reads a Json-Array into a Java Boxed-Primitives Consumer
      Modifier and Type Method
      static SettingsRec<Boolean,​Void> booleanRec​(boolean defaultValue, int FLAGS, Function<String,​Boolean> optionalUserParser)
      static SettingsRec<Byte,​Void> byteRec​(byte defaultValue, int FLAGS, Function<String,​Byte> optionalUserParser)
      static SettingsRec<Double,​Void> doubleRec​(double defaultValue, int FLAGS, Function<String,​Double> optionalUserParser)
      static SettingsRec<Float,​Void> floatRec​(float defaultValue, int FLAGS, Function<String,​Float> optionalUserParser)
      static SettingsRec<Integer,​Void> intRec​(int defaultValue, int FLAGS, Function<String,​Integer> optionalUserParser)
      static SettingsRec<Long,​Void> longRec​(long defaultValue, int FLAGS, Function<String,​Long> optionalUserParser)
      static SettingsRec<Number,​Void> numberRec​(Number defaultValue, int FLAGS, Function<String,​Number> optionalUserParser)
      static SettingsRec<Short,​Void> shortRec​(short defaultValue, int FLAGS, Function<String,​Short> optionalUserParser)
       
      Generate a SettingsRec Instance which reads a Json-Array into a Boxed-Primitives Consumer, w/ Array-Indices
      Modifier and Type Method
      static SettingsRec<Boolean,​Void> booleanRec2​(boolean defaultValue, int FLAGS, Function<String,​Boolean> optionalUserParser)
      static SettingsRec<Byte,​Void> byteRec2​(byte defaultValue, int FLAGS, Function<String,​Byte> optionalUserParser)
      static SettingsRec<Double,​Void> doubleRec2​(double defaultValue, int FLAGS, Function<String,​Double> optionalUserParser)
      static SettingsRec<Float,​Void> floatRec2​(float defaultValue, int FLAGS, Function<String,​Float> optionalUserParser)
      static SettingsRec<Integer,​Void> intRec2​(int defaultValue, int FLAGS, Function<String,​Integer> optionalUserParser)
      static SettingsRec<Long,​Void> longRec2​(long defaultValue, int FLAGS, Function<String,​Long> optionalUserParser)
      static SettingsRec<Number,​Void> numberRec2​(Number defaultValue, int FLAGS, Function<String,​Number> optionalUserParser)
      static SettingsRec<Short,​Void> shortRec2​(short defaultValue, int FLAGS, Function<String,​Short> optionalUserParser)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • intRec

        🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Integer,​java.lang.Void> intRec​
                    (int defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Integer> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed-Integer Consumer
        Generates: An Integer-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Integer, Void> rec = RJArrBoxedConsumerRec.intRec(0, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Integer> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • shortRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Short,​java.lang.Void> shortRec​
                    (short defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Short> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed Short-Integer Consumer
        Generates: A Short-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Short, Void> rec = RJArrBoxedConsumerRec.shortRec(0, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Short> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • byteRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Byte,​java.lang.Void> byteRec​
                    (byte defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Byte> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed-Byte Consumer
        Generates: A Byte-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Byte, Void> rec = RJArrBoxedConsumerRec.byteRec(0, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Byte> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • longRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Long,​java.lang.Void> longRec​
                    (long defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Long> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed Long-Integer Consumer
        Generates: A Long-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Long, Void> rec = RJArrBoxedConsumerRec.longRec(0, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Long> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • doubleRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Double,​java.lang.Void> doubleRec​
                    (double defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Double> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed-Double Consumer
        Generates: A Double-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Double, Void> rec = RJArrBoxedConsumerRec.doubleRec(0.0, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Double> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • floatRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Float,​java.lang.Void> floatRec​
                    (float defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Float> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed-Float Consumer
        Generates: A Float-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Float, Void> rec = RJArrBoxedConsumerRec.floatRec(0.0f, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Float> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • booleanRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Boolean,​java.lang.Void> booleanRec​
                    (boolean defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Boolean> optionalUserParser)
        
        Create a SettingsRec Instance for a Boxed-Boolean Consumer
        Generates: A Boolean-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.booleanToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Boolean, Void> rec = RJArrBoxedConsumerRec.booleanRec(false, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Boolean> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.booleanToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • numberRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Number,​java.lang.Void> numberRec​
                    (java.lang.Number defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Number> optionalUserParser)
        
        Create a SettingsRec Instance for a (Best Filt) Boxed-Number Consumer
        Generates: A Number-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Number, Void> rec = RJArrBoxedConsumerRec.intRec(0, 0, null);
        
        for (JsonArray ja : someJsonArraySource)
        {
            // Create a new Consumer, make sure to use the Double-Colon '::' Syntax Here
            final List<Number> list = new List<>();
            rec.setConsumer(list::add);
        
            // Process the Json-Array, and send the results to the consumer
            ProcessJsonArray.numericToJava(ja, rec);
        
            // The list has been properly populated, so now use the results
            doSomethingWith(list);
        }
        
      • intRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Integer,​java.lang.Void> intRec2​
                    (int defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Integer> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed-Integers, w/ Array-Indices
        Generates: An Integer-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Integer, Void> rec = RJArrBoxedConsumerRec.intRec2(1, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Integer> c =
            (int jsonArrayIndex, int successCount, Integer value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);
        
      • shortRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Short,​java.lang.Void> shortRec2​
                    (short defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Short> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed Short-Integers, w/ Array-Indices
        Generates: A Short-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Short, Void> rec = RJArrBoxedConsumerRec.shortRec2(1, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Short> c =
            (int jsonArrayIndex, int successCount, Short value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);
        
      • byteRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Byte,​java.lang.Void> byteRec2​
                    (byte defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Byte> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed-Bytes, w/ Array-Indices
        Generates: A Byte-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Byte, Void> rec = RJArrBoxedConsumerRec.byteRec2(1, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Byte> c =
            (int jsonArrayIndex, int successCount, Byte value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);
        
      • longRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Long,​java.lang.Void> longRec2​
                    (long defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Long> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed Long-Integers, w/ Array-Indices
        Generates: A Long-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Long, Void> rec = RJArrBoxedConsumerRec.longRec2(1, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Long> c =
            (int jsonArrayIndex, int successCount, Long value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);
        
      • doubleRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Double,​java.lang.Void> doubleRec2​
                    (double defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Double> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed-Doubles, w/ Array-Indices
        Generates: A Double-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Double, Void> rec = RJArrBoxedConsumerRec.doubleRec2(1.0, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Double> c =
            (int jsonArrayIndex, int successCount, Double value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);
        
      • floatRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Float,​java.lang.Void> floatRec2​
                    (float defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Float> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed-Floats, w/ Array-Indices
        Generates: A Float-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Float, Void> rec = RJArrBoxedConsumerRec.floatRec2(1.0f, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Float> c =
            (int jsonArrayIndex, int successCount, Float value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);
        
      • booleanRec2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Boolean,​java.lang.Void> booleanRec2​
                    (boolean defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Boolean> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Boxed-Booleans, w/ Array-Indices
        Generates: A Boolean-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.booleanToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Boolean, Void> rec = RJArrBoxedConsumerRec.booleanRec2(false, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Boolean> c =
            (int jsonArrayIndex, int successCount, Boolean value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.booleanToJava(ja, rec);
        
      • numberRec2

        🡅         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Number,​java.lang.Void> numberRec2​
                    (java.lang.Number defaultValue,
                     int FLAGS,
                     java.util.function.Function<java.lang.String,​java.lang.Number> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of (Best-Fit) Boxed-Numbers, w/ Array-Indices
        Generates: A Number-Retrieval Settings-Record, w/ an "Array-Indices & Count Consumer"
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
         

        Example:
        // Generate a new & re-useable SettingsRec (Make less work for the G.C.)
        final SettingsRec<Number, Void> rec = RJArrBoxedConsumerRec.numberRec2(1, 0, null);
        
        // Create a Simple "Print the Values & Counts" Consumer.
        final IntIntTConsumer<Number> c =
            (int jsonArrayIndex, int successCount, Number value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + successCount + ", value: " + value)
        
        // You must provide a consumer.  The Double-Colon '::' Syntax is not required here.
        rec.setConsumer(c);
        
        // Re-Uses the Same SettingsRec instance.  Also reuses the exact same Printing-Consumer
        for (JsonArray ja : someJsonArraySource)
            ProcessJsonArray.numericToJava(ja, rec);