Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.blogspot.applications4android.comicreader.core
Class RandUtils

    java.lang.Object
      com.blogspot.applications4android.comicreader.core.RandUtils

    public class RandUtils

extends java.lang.Object

Utilities class for generating random numbers

Method Summary
`static RandUtils` | `getObj()` Gets the object of this class
`static int` | `getPositiveInt()` Generate a positive random integer
`static int` | `getPositiveInt(int limit)` Generate a positive random integer
`static int` | `getPositiveInt(int limit, int first)` Generate a positive random integer
`static long` | `getPositiveLong()` Generate a positive random long integer
`static long` | `getPositiveLong(long limit)` Generate a positive random long integer
`static long` | `getPositiveLong(long limit, long first)` Generate a positive random long integer
`static java.util.Random` | `getRNG()` Gets the RNG for this class

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getObj

    public static RandUtils getObj()

  Gets the object of this class

  Returns:
    the desired object

### getRNG

    public static java.util.Random getRNG()

  Gets the RNG for this class

  Returns:
    desired object of the class java.util.Random

### getPositiveInt

    public static int getPositiveInt()

  Generate a positive random integer

  Returns:
    positive integer

### getPositiveInt

    public static int getPositiveInt(int limit)

  Generate a positive random integer

  Parameters:
    `limit` - numbers should be between 0 to limit-1
  Returns:
    positive integer

### getPositiveInt

    public static int getPositiveInt(int limit,
                                     int first)

  Generate a positive random integer

  Parameters:
    `limit` - numbers should be between 0 to limit-1
    `first` - the first number in the range first to first + limit - 1
  Returns:
    positive integer

### getPositiveLong

    public static long getPositiveLong()

  Generate a positive random long integer

  Returns:
    positive long integer

### getPositiveLong

    public static long getPositiveLong(long limit)

  Generate a positive random long integer

  Parameters:
    `limit` - numbers should be between 0 to limit-1
  Returns:
    positive long integer

### getPositiveLong

    public static long getPositiveLong(long limit,
                                       long first)

  Generate a positive random long integer

  Parameters:
    `limit` - numbers should be between 0 to limit-1
    `first` - the first number in the range first to first + limit - 1
  Returns:
    positive long integer

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD