com.atlassian.bamboo.utils
Class Random

java.lang.Object
  extended by com.atlassian.bamboo.utils.Random

public class Random
extends java.lang.Object

This class generates random stuff!


Constructor Summary
Random()
           
 
Method Summary
 char randomAlpha()
          Generate a random alphabetic character - a-z or A-Z
 char randomAlphaNumeric()
          Generate a random alphanumeric character.
 char randomNumeric()
          Generate a random digit - from 0 - 9
 java.lang.String randomString(int length)
          Generate a random string of characters and numbers
 java.lang.String randomString(int length, boolean includeNumbers)
          Generate a random string of characters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Random

public Random()
Method Detail

randomString

public java.lang.String randomString(int length)
Generate a random string of characters and numbers

Parameters:
length - The size of the generated string

randomString

public java.lang.String randomString(int length,
                                     boolean includeNumbers)
Generate a random string of characters

Parameters:
length - The size of the generated string
includeNumbers - Should the string contain just alpha or alpha numeric charaters

randomAlphaNumeric

public char randomAlphaNumeric()
Generate a random alphanumeric character.


randomAlpha

public char randomAlpha()
Generate a random alphabetic character - a-z or A-Z


randomNumeric

public char randomNumeric()
Generate a random digit - from 0 - 9



Copyright © 2010 Atlassian. All Rights Reserved.