Class RJArrPrimConsumerRec


  • public class RJArrPrimConsumerRec
    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.

    • PrimConsumer - Data is sent to a Java Primitive-Consumer.

    • 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-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.
    To-<PRIMITIVE>
    Function<String>
    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
    • 14 Method(s), 14 declared static
    • 0 Field(s)


    • Method Summary

       
      Generate a SettingsRec Instance which reads a Json-Array into a Primitive-Consumer
      Modifier and Type Method
      static SettingsRec<Boolean,​Void> booleanArr​(boolean defaultValue, int FLAGS, Predicate<String> optionalUserParser)
      static SettingsRec<Byte,​Void> byteArr​(byte defaultValue, int FLAGS, ToByteFunction<String> optionalUserParser)
      static SettingsRec<Double,​Void> doubleArr​(double defaultValue, int FLAGS, ToDoubleFunction<String> optionalUserParser)
      static SettingsRec<Float,​Void> floatArr​(float defaultValue, int FLAGS, ToFloatFunction<String> optionalUserParser)
      static SettingsRec<Integer,​Void> intArr​(int defaultValue, int FLAGS, ToIntFunction<String> optionalUserParser)
      static SettingsRec<Long,​Void> longArr​(long defaultValue, int FLAGS, ToLongFunction<String> optionalUserParser)
      static SettingsRec<Short,​Void> shortArr​(short defaultValue, int FLAGS, ToShortFunction<String> optionalUserParser)
       
      Generate a SettingsRec Instance which reads a Json-Array into a Primitive-Consumer, w/ Array-Indices
      Modifier and Type Method
      static SettingsRec<Boolean,​Void> booleanArr2​(boolean defaultValue, int FLAGS, Predicate<String> optionalUserParser)
      static SettingsRec<Byte,​Void> byteArr2​(byte defaultValue, int FLAGS, ToByteFunction<String> optionalUserParser)
      static SettingsRec<Double,​Void> doubleArr2​(double defaultValue, int FLAGS, ToDoubleFunction<String> optionalUserParser)
      static SettingsRec<Float,​Void> floatArr2​(float defaultValue, int FLAGS, ToFloatFunction<String> optionalUserParser)
      static SettingsRec<Integer,​Void> intArr2​(int defaultValue, int FLAGS, ToIntFunction<String> optionalUserParser)
      static SettingsRec<Long,​Void> longArr2​(long defaultValue, int FLAGS, ToLongFunction<String> optionalUserParser)
      static SettingsRec<Short,​Void> shortArr2​(short defaultValue, int FLAGS, ToShortFunction<String> optionalUserParser)
      • Methods inherited from class java.lang.Object

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

      • intArr

        🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Integer,​java.lang.Void> intArr​
                    (int defaultValue,
                     int FLAGS,
                     java.util.function.ToIntFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive-Integer Consumer
        Generates: An Integer-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'int' Type is Auto-Converted to an 'Integer' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Integer, Void> rec = RJArrPrimConsumerRec.intRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • shortArr

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Short,​java.lang.Void> shortArr​
                    (short defaultValue,
                     int FLAGS,
                     ToShortFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive Short-Integer Consumer
        Generates: A Short-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'short' Type is Auto-Converted to an 'Short' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (short value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Short, Void> rec = RJArrPrimConsumerRec.shortRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((short primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • byteArr

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Byte,​java.lang.Void> byteArr​
                    (byte defaultValue,
                     int FLAGS,
                     ToByteFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive-Byte Consumer
        Generates: A Byte-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'byte' Type is Auto-Converted to an 'Byte' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (byte value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Byte, Void> rec = RJArrPrimConsumerRec.byteRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((byte primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • longArr

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Long,​java.lang.Void> longArr​
                    (long defaultValue,
                     int FLAGS,
                     java.util.function.ToLongFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive Long-Integer Consumer
        Generates: A Long-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'long' Type is Auto-Converted to an 'Long' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (long value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Long, Void> rec = RJArrPrimConsumerRec.longRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((long primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • doubleArr

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Double,​java.lang.Void> doubleArr​
                    (double defaultValue,
                     int FLAGS,
                     java.util.function.ToDoubleFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive-Double Consumer
        Generates: A Double-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'double' Type is Auto-Converted to an 'Double' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (double value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Double, Void> rec = RJArrPrimConsumerRec.doubleRec(ja, -1.0, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((double primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • floatArr

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Float,​java.lang.Void> floatArr​
                    (float defaultValue,
                     int FLAGS,
                     ToFloatFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive-Float Consumer
        Generates: A Float-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'float' Type is Auto-Converted to an 'Float' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.numericToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (float value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Float, Void> rec = RJArrPrimConsumerRec.floatRec(ja, -1.0f, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((float primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • booleanArr

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Boolean,​java.lang.Void> booleanArr​
                    (boolean defaultValue,
                     int FLAGS,
                     java.util.function.Predicate<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Primitive-Boolean Consumer
        Generates: A Boolean-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'boolean' Type is Auto-Converted to an 'Boolean' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.booleanToJava(JsonArray, SettingsRec)
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Class JFlag for information about parameter 'FLAGS'
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (boolean value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Boolean, Void> rec = RJArrPrimConsumerRec.booleanRec(ja, false, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((boolean primVal) -> System.out.println(primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.booleanToJava(ja, rec);
        
      • intArr2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Integer,​java.lang.Void> intArr2​
                    (int defaultValue,
                     int FLAGS,
                     java.util.function.ToIntFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive-Integers, w/ Array-Indices
        Generates: An Integer-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'int' Type is Auto-Converted to an 'Integer' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, int value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Integer, Void> rec = RJArrPrimConsumerRec.intRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, int primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • shortArr2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Short,​java.lang.Void> shortArr2​
                    (short defaultValue,
                     int FLAGS,
                     ToShortFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive Short-Integers, w/ Array-Indices
        Generates: A Short-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'short' Type is Auto-Converted to an 'Short' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, short value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Short, Void> rec = RJArrPrimConsumerRec.shortRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, short primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • byteArr2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Byte,​java.lang.Void> byteArr2​
                    (byte defaultValue,
                     int FLAGS,
                     ToByteFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive-Bytes, w/ Array-Indices
        Generates: A Byte-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'byte' Type is Auto-Converted to an 'Byte' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, byte value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Byte, Void> rec = RJArrPrimConsumerRec.byteRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, byte primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • longArr2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Long,​java.lang.Void> longArr2​
                    (long defaultValue,
                     int FLAGS,
                     java.util.function.ToLongFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive Long-Integers, w/ Array-Indices
        Generates: A Long-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'long' Type is Auto-Converted to an 'Long' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, long value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Long, Void> rec = RJArrPrimConsumerRec.longRec(ja, -1, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, long primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • doubleArr2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Double,​java.lang.Void> doubleArr2​
                    (double defaultValue,
                     int FLAGS,
                     java.util.function.ToDoubleFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive-Doubles, w/ Array-Indices
        Generates: A Double-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'double' Type is Auto-Converted to an 'Double' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, double value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Double, Void> rec = RJArrPrimConsumerRec.doubleRec(ja, -1.0, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, double primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • floatArr2

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Float,​java.lang.Void> floatArr2​
                    (float defaultValue,
                     int FLAGS,
                     ToFloatFunction<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive-Floats, w/ Array-Indices
        Generates: A Float-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'float' Type is Auto-Converted to an 'Float' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, float value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Float, Void> rec = RJArrPrimConsumerRec.floatRec(ja, -1.0f, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, float primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.numericToJava(ja, rec);
        
      • booleanArr2

        🡅         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.Boolean,​java.lang.Void> booleanArr2​
                    (boolean defaultValue,
                     int FLAGS,
                     java.util.function.Predicate<java.lang.String> optionalUserParser)
        
        Create a SettingsRec Instance for a Consumer of Primitive-Booleans, w/ Array-Indices
        Generates: A Boolean-Retrieval Settings-Record.
        Auto-Boxing: Thanks to Java's Auto-Boxing & Un-Boxing the 'boolean' Type is Auto-Converted to an 'Boolean' Type
        Important: Java-Generics cannot assume a Primitive-Types for a Type-Parameter.
           
        Removes: Any JFlag masks which might insert null-entries in the return-stream
        See: Flag JFlag.NOT_ALLOWED_RET_NULL_MASKS for a list of all disallowed & filtered flags.
        Expects: The Generated Record expects a Consumer with a Lambda-Signature like:
          Signature void accept (int jsonArray, int successCount, boolean value)
         

        Example:
        // Generate a reusable, pre-configured SettingsRec instance
        final SettingsRec<Boolean, Void> rec = RJArrPrimConsumerRec.booleanRec(ja, false, 0, null);
        
        // You must provide a consumer.
        rec.setConsumer((int jsonArrayIndex, int successCount, boolean primVal) ->
            System.out.println
                ("JsonArray-Index: " + jsonArrayIndex + ", count: " + successCount + ", value: " + primVal);
        
        // Process the Json-Array, and send the results to the consumer
        ProcessJsonArray.booleanToJava(ja, rec);