net.ranides.assira.math
Class Randomizer

java.lang.Object
  extended by net.ranides.assira.math.Randomizer

public final class Randomizer
extends Object

Author:
ranides

Field Summary
static String ALPHA
           
static String ALPHA_LOWER
           
static String ALPHA_UPPER
           
static String ALPHANUM
           
static String DIGITS
           
 
Method Summary
static boolean bool()
           
static char character()
          Zwraca dowolny losowy znak alfanumeryczny
static char character(String chars)
          Zwraca losowy znak z podanego zbioru.
static Color color(Color min, Color max)
          Losuje kolor pośredni między dwoma podanymi.
static Color color(float min, float max)
          Losuje kolor o maksymalnym nasyceniu (Saturation), dowolnej barwie (Hue) i jasności z podanego zakresu.
static
<T> List<T>
list(Class<T> type, int size)
           
static long number()
          Losuje liczbę z zakresu [0;Long.MAX_VALUE)
static byte number(byte max)
          Losuje liczbę z zakresu [0;max)
static byte number(byte min, byte max)
          Losuje liczbę z zakresu [min;max]
static double number(double max)
           
static double number(double min, double max)
           
static float number(float max)
           
static float number(float min, float max)
          Losuje liczbę z zakresu [min;max]
static int number(int max)
          Losuje liczbę z zakresu [0;max)
static int number(int min, int max)
          Losuje liczbę z zakresu [min;max]
static long number(long max)
          Losuje liczbę z zakresu [0;max)
static long number(long min, long max)
          Losuje liczbę z zakresu [min;max]
static short number(short max)
          Losuje liczbę z zakresu [0;max)
static short number(short min, short max)
          Losuje liczbę z zakresu [min;max]
static
<T> T
object(Class<T> type)
           
static String text(int size)
          Generuje losowy ciąg znaków, zawierający losowe znaki alfanumeryczne oraz spacje, o długości size.
static String text(int size, String chars)
          Generuje losowy ciąg znaków, zawierający podane znaki, o długości size.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIGITS

public static final String DIGITS
See Also:
Constant Field Values

ALPHA_LOWER

public static final String ALPHA_LOWER
See Also:
Constant Field Values

ALPHA_UPPER

public static final String ALPHA_UPPER
See Also:
Constant Field Values

ALPHA

public static final String ALPHA
See Also:
Constant Field Values

ALPHANUM

public static final String ALPHANUM
See Also:
Constant Field Values
Method Detail

number

public static long number()
Losuje liczbę z zakresu [0;Long.MAX_VALUE)

Returns:

number

public static long number(long max)
Losuje liczbę z zakresu [0;max)

Parameters:
max -
Returns:

number

public static byte number(byte max)
Losuje liczbę z zakresu [0;max)

Parameters:
max -
Returns:

number

public static long number(long min,
                          long max)
Losuje liczbę z zakresu [min;max]

Parameters:
min -
max -
Returns:

number

public static int number(int max)
Losuje liczbę z zakresu [0;max)

Parameters:
max -
Returns:

number

public static int number(int min,
                         int max)
Losuje liczbę z zakresu [min;max]

Parameters:
min -
max -
Returns:

number

public static short number(short max)
Losuje liczbę z zakresu [0;max)

Parameters:
max -
Returns:

number

public static short number(short min,
                           short max)
Losuje liczbę z zakresu [min;max]

Parameters:
min -
max -
Returns:

number

public static byte number(byte min,
                          byte max)
Losuje liczbę z zakresu [min;max]

Parameters:
min -
max -
Returns:

number

public static float number(float min,
                           float max)
Losuje liczbę z zakresu [min;max]

Parameters:
min -
max -
Returns:

number

public static float number(float max)

number

public static double number(double min,
                            double max)

number

public static double number(double max)

bool

public static boolean bool()

text

public static String text(int size,
                          String chars)
Generuje losowy ciąg znaków, zawierający podane znaki, o długości size.

Parameters:
size -
chars -
Returns:

text

public static String text(int size)
Generuje losowy ciąg znaków, zawierający losowe znaki alfanumeryczne oraz spacje, o długości size.

Parameters:
size -
chars -
Returns:

color

public static Color color(float min,
                          float max)
Losuje kolor o maksymalnym nasyceniu (Saturation), dowolnej barwie (Hue) i jasności z podanego zakresu.

Parameters:
min -
max -
Returns:

color

public static Color color(Color min,
                          Color max)
Losuje kolor pośredni między dwoma podanymi.

Parameters:
min -
max -
Returns:

character

public static char character()
Zwraca dowolny losowy znak alfanumeryczny

Returns:

character

public static char character(String chars)
Zwraca losowy znak z podanego zbioru.

Parameters:
chars -
Returns:

object

public static <T> T object(Class<T> type)

list

public static <T> List<T> list(Class<T> type,
                               int size)


Copyright © 2013. All Rights Reserved.