com.zipcodewilmington.streams.tools

## Class RandomUtils

- java.lang.Object
- - com.zipcodewilmington.streams.tools.RandomUtils

-     public final class RandomUtils
      extends java.lang.Object

  Created by Leon on 2/4/2017.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `createBoolean(float percentage)`
    `static java.lang.Character` | `createCharacter(char min, char max)`
    `static java.awt.Color` | `createColor(int maxRed, int maxGreen, int maxBlue)`
    `static java.util.Date` | `createDate(int minYear, int maxYear)`
    `static java.lang.Double` | `createDouble(java.lang.Double min, java.lang.Double max)`
    `static java.lang.Float` | `createFloat(float min, float max)`
    `static java.lang.Integer` | `createInteger(java.lang.Integer min, java.lang.Integer max)`
    `static java.lang.Long` | `createLong(java.lang.Long min, java.lang.Long max)`
    `static java.lang.String` | `createString(char min, char max, int stringLength)`
    `static java.lang.String[]` | `createStrings(char min, char max, int stringLength, int stringCount)`
    `static <E> E` | `selectElement(E[] array)`
    `static java.lang.String` | `shuffleCasing(java.lang.String str)`
    `static java.lang.String[]` | `shuffleStringArray(java.lang.String... array)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Method Detail

    - #### createBoolean

          public static boolean createBoolean(float percentage)

      Returns:
        true with the likelihood of specified percentage

    - #### createCharacter

          public static java.lang.Character createCharacter(char min,
                                                            char max)

      Returns:
        a random character between the specified min and max character range

    - #### createDouble

          public static java.lang.Double createDouble(java.lang.Double min,
                                                      java.lang.Double max)

      Returns:
        a random double between the specified min and max numeric range

    - #### createFloat

          public static java.lang.Float createFloat(float min,
                                                    float max)

      Returns:
        a random float between the specified min and max numeric range

    - #### createInteger

          public static java.lang.Integer createInteger(java.lang.Integer min,
                                                        java.lang.Integer max)

      Returns:
        a random integer between the specified min and max numeric range

    - #### createLong

          public static java.lang.Long createLong(java.lang.Long min,
                                                  java.lang.Long max)

      Returns:
        a random long between the specified min and max numeric range

    - #### createString

          public static java.lang.String createString(char min,
                                                      char max,
                                                      int stringLength)

      Returns:
        a random string of the specified length containing characters in the specified range

    - #### createStrings

          public static java.lang.String[] createStrings(char min,
                                                         char max,
                                                         int stringLength,
                                                         int stringCount)

      Returns:
        an array of random string objects of the specified length containing characters in the specified range

    - #### createDate

          public static java.util.Date createDate(int minYear,
                                                  int maxYear)

      Returns:
        a random date object ranging between the specified dates

    - #### selectElement

          public static <E> E selectElement(E[] array)

      Returns:
        a random element from the sepcified array

    - #### shuffleCasing

          public static java.lang.String shuffleCasing(java.lang.String str)

      Returns:
        specified string value with random upper and lower casing assigned to each character

    - #### shuffleStringArray

          public static java.lang.String[] shuffleStringArray(java.lang.String... array)

      Returns:
        shuffles the specified string array

    - #### createColor

          public static java.awt.Color createColor(int maxRed,
                                                   int maxGreen,
                                                   int maxBlue)

      Returns:
        a random color with the specified maximum rgb values