fsmvis.utils
Class Utils

java.lang.Object
  |
  +--fsmvis.utils.Utils

public class Utils
extends java.lang.Object


Constructor Summary
Utils()
           
 
Method Summary
static java.util.ArrayList createRandomSample(java.util.HashSet include, java.util.HashSet exclude, int max, int size)
          Creates a random List of integers, all different, with maximum value max and with size elements, with no elements from exclude, and only elements from include.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

createRandomSample

public static java.util.ArrayList createRandomSample(java.util.HashSet include,
                                                     java.util.HashSet exclude,
                                                     int max,
                                                     int size)
Creates a random List of integers, all different, with maximum value max and with size elements, with no elements from exclude, and only elements from include. include U exclude should be the empty set
Parameters:
include - Values that should be in the random sample
exclude - Values that should not be in the random sample
size - The number of elements
max - The maximum value for a random number
Returns:
The arraylist of random values