Package org.snpsift.util

# Class RandomUtil

java.lang.Object
org.snpsift.util.RandomUtil

public class RandomUtil extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String[]`
`ACGT`
`static final int`
`SHORT_VARIANT_LEN`

## Constructor Summary

Constructors
Constructor
Description
`RandomUtil()`
`RandomUtil(int seed)`

## Method Summary

Modifier and Type
Method
Description
`double`
`rand()`
`String`
`randAcgt()`
`String`
`randBase(String notBase)`
`String`
`randBases(int len)`
`String`
`randBases(int len, String notBases)`
`boolean`
`randBool()`
`Boolean`
`randBoolOrNull()`
`char`
`randChar()`
`Character`
`randCharOrNull()`
`double`
`randDouble(double maxDouble)`
`Double`
`randDoubleOrNull()`
`String`
`randEnum(ArrayList<String> enumStrings)`
`String`
`randEnumOrNull(ArrayList<String> enumStrings)`
`int`
`randInt()`
`int`
`randInt(int maxInt)`
`Integer`
`randIntOrNull()`
`Integer`
`randIntOrNull(int maxInt)`
`long`
`randLong()`
`long`
`randLong(long maxLong)`
`Long`
`randLongOrNull()`
`Long`
`randLongOrNull(long maxLong)`
`String`
`randString(int maxLen)`
`String`
`randStringOrNull()`
`String`
`randStringOrNull(int maxLen)`
`org.snpeff.util.Tuple<String,String>`
`randVariant(VariantCategory variantCategory)`
`String`
`randVariantAlt(VariantCategory variantCategory, String ref)`
`String`
`randVariantRef(VariantCategory variantCategory)`
`void`
`reset()`
`void`
`setNullRatio(double nullRatio)`
`void`
`setRand(Random rand)`
`void`
`setSeed(long seed)`

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

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

## Field Details

### ACGT

public static final String[] ACGT

### SHORT_VARIANT_LEN

public static final int SHORT_VARIANT_LEN

See Also:
  - Constant Field Values

## Constructor Details

### RandomUtil

public RandomUtil()

### RandomUtil

public RandomUtil(int seed)

## Method Details

### reset

public void reset()

### rand

public double rand()

### randAcgt

public String randAcgt()

### randBase

public String randBase(String notBase)

### randBases

public String randBases(int len)

### randBases

public String randBases(int len, String notBases)

### randBool

public boolean randBool()

### randBoolOrNull

public Boolean randBoolOrNull()

### randChar

public char randChar()

### randCharOrNull

public Character randCharOrNull()

### randDouble

public double randDouble(double maxDouble)

### randDoubleOrNull

public Double randDoubleOrNull()

### randEnum

public String randEnum(ArrayList<String> enumStrings)

### randEnumOrNull

public String randEnumOrNull(ArrayList<String> enumStrings)

### randInt

public int randInt()

### randInt

public int randInt(int maxInt)

### randIntOrNull

public Integer randIntOrNull()

### randIntOrNull

public Integer randIntOrNull(int maxInt)

### randLong

public long randLong()

### randLong

public long randLong(long maxLong)

### randLongOrNull

public Long randLongOrNull()

### randLongOrNull

public Long randLongOrNull(long maxLong)

### randString

public String randString(int maxLen)

### randStringOrNull

public String randStringOrNull()

### randStringOrNull

public String randStringOrNull(int maxLen)

### randVariant

public org.snpeff.util.Tuple<String,String> randVariant(VariantCategory variantCategory)

### randVariantAlt

public String randVariantAlt(VariantCategory variantCategory, String ref)

### randVariantRef

public String randVariantRef(VariantCategory variantCategory)

### setNullRatio

public void setNullRatio(double nullRatio)

### setSeed

public void setSeed(long seed)

### setRand

public void setRand(Random rand)