Java Random randomId()

Here you can find the source of randomId()

Description

Create and return an ID that's (virtually) guaranteed not to name a real object on a GA4GH server.

License

Apache License

Return

an ID that's (virtually) guaranteed not to name a real object

Declaration

public static String randomId() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    /**/*from   w  w  w. j av a  2  s.  c o  m*/
     * Create and return an ID that's (virtually) guaranteed not to name a real object on a
     * GA4GH server.  It uses {@link UUID#randomUUID()} to do it.
     * This is identical to {@link #randomName()} but for the name.
     * @return an ID that's (virtually) guaranteed not to name a real object
     */
    public static String randomId() {
        return UUID.randomUUID().toString();
    }
}

Related

  1. randomFromIterator(Iterator iter)
  2. randomGaussian(int numElements)
  3. randomGreyLevels(double max, double min)
  4. randomIcon()
  5. randomID()
  6. randomIndices(Random r, int minCount, int maxCount)
  7. randomInRange(double min, double max)
  8. randomInsults()
  9. randomIntArray(int len, Random rand)