Package Torello.JSON

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 Glass Fish Tool is included in the J2EE, and is available on GitHub. That is the one used by the Java HTML JAR Library (See: javax.json.* )

    Primary Classes Used: JsonArray and JsonObject


    This comment-note is intentionally repeated, verbatim, at the top of all Json Reader Classes in this package.


    JSON to Java Binding:
    JSON-Binding is the art of converting data that has been stored, saved or transmitted using Java-Script Object Notation into a Java Primitive or Object-Type. JSON can arrive into Java-Program Memory from almost any source. If you are wondering why such a massive amount of "work" is necessary just to convert a Json Integer into Java Integer, the value added is the extraordinary amount of attention paid to user configuration, error checking, & exception messaging. Methods here don't require more than 1 or 2 lines of code, and guarantee that a thorough type checking is performed.

    Unlike Java-Types which are checked by the Java-Compiler each-and-every time a programmer compiles his project, any guarantee that JSON-Type Data is pristine, uncorrupted, and in any kind of pre-agreed format may or may not be assured. The methods here are able to handle changes that might be made to an API (possibly from great distances away, and without the Software-Manager's consent). If an error could occur, configuration flags can be used to determine default error-recovery behaviors. If an exception does throw, the exception messages printed will contain multiple lines of detailed information.

    • Utilizes the Java-Standard javax.json.* Package-Library, & its Glass-Fish Implementation
    • Handles the Transfer & Conversion of All Json-Type's into Java-Type's with just One Line of Code
    • Provides all manner of User-Configurable Exception-Handling & Error-Decision Management via Class JFlag
    • Provides a Fine-Grained Suite of Exception-Classes, all with Consistent & Meaningful Error-Messages. Json Files can occasionally grow extremely large, and error messaging details make debugging easier
    • Primary Helper-Classes for the (Experimental) Google-Chrome Browser Automation Package

    The goal of Torello.JSON is to provide small, static helper methods in the same spirit as java.util.Objects and java.util.Arrays: simple calls that keep JSON handling out of your application logic. Instead of repeating loops, type checks, null checks, and exception wiring at every call site, these methods centralize that work behind a consistent set of straight-forward “read value” operations.


    Generate a Settings-Record for reading JsonArray's which Sends Boxed-Values to a Consumer

    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:
    Methods in this class whose name ends with the letters 'Rec' are methods that 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.

    In order to guarantee that there is a homogenous algorithm for processing these array indices, only a few 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 multiple short-lived, ephemeral, object instances (which are immediately discarded and collected by the Garbage-Collector) can be avoided.

    To do this is quite simple. Please review the documentation for any and all methods in this JSON Package whose name ends with 'Rec' - and look at the example code provided for how to use them. Most of those methods do include an example. Using a Loop Optimized method is a very simple, two step procedure as explained here:

    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 JsonArray 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 JsonArray 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Integer, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_INTEGER())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Short, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_SHORT())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Byte, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_BYTE())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Long, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_LONG())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Double, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_DOUBLE())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Float, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_FLOAT())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Boolean, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_BOOLEAN())
             .updateableConsumer(true);
        
      • 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);
        }
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Number, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.NUMBER_REC())
             .updateableConsumer(true);
        
      • 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 acceptCount, Integer value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Integer, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_INTEGER())
             .updateableConsumer(false);
        
      • 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 acceptCount, Short value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Short, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_SHORT())
             .updateableConsumer(false);
        
      • 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 acceptCount, Byte value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Byte, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_BYTE())
             .updateableConsumer(false);
        
      • 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 acceptCount, Long value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Long, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_LONG())
             .updateableConsumer(false);
        
      • 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 acceptCount, Double value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Double, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_DOUBLE())
             .updateableConsumer(false);
        
      • 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 acceptCount, Float value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Float, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_FLOAT())
             .updateableConsumer(false);
        
      • 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 acceptCount, Boolean value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Boolean, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.BOXED_BOOLEAN())
             .updateableConsumer(false);
        
      • 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 acceptCount, Number value) -> System.out.println
                ("arrPos: " + jsonArrayIndex + ", count: " + acceptCount + ", 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);
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<Number, Void>
             (defaultValue, FLAGS, optionalUserParser, BASIC_TYPES.NUMBER_REC())
             .updateableConsumer(false);