Class RJArrIntoJavaArray


  • public class RJArrIntoJavaArray
    extends java.lang.Object
    This class does not actually have any methods or fields, at all! This class exists solely for the purposes of this documentation page, which you are looking at at this very moment.

    In order to obtain a standard Java-Array of String[], Object[] (a.k.a. T[]), or an array of any of the Boxed-Type Primitives (such as Integer[], or maybe Boolean[] - with a capital 'B' ), please review the following explanation for how to do so. The purpose of this page is merely to serve as a reminder that converting any Java-Stream into a Java-Array is an extremely trivial operation.

    Example:
    // Suppose this method is any arbitrary method which populates a Java-Vector with
    // a list of String-Data
    
    Vector<String> v = someVectorRetrievalMethod();
    
    
    // This invocation converts the Vector into a Java-Stream, and then uses the Stream-API's 
    // 'toArray' method to convert the Vector into a String[]Java-Array
    
    String strArr = v.stream().toArray(String[]::new);
    


    The following calls can easily produce an array of any of the basic Java-Types. Please review the appropriate use of the simple Java Stream-API 'Stream.toArray(IntFunction<T>)' method, here below:




    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
    • 0 Method(s)
    • 0 Field(s)


    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait