public ScriptedRandomSource(){
  final String property=System.getProperty(SCRIPTED_RANDOM_PROPERTY,"1,2,3");
  final int length=property.split(",").length;
  final StringTokenizer tokenizer=new StringTokenizer(property,",");
  m_numbers=new int[length];
  for (int i=0; i < m_numbers.length; i++) {
    final String token=tokenizer.nextToken();
    if (token.equals("e")) {
      m_numbers[i]=ERROR;
    }
 else     if (token.equals("p")) {
      m_numbers[i]=PAUSE;
    }
 else {
      m_numbers[i]=Integer.parseInt(token) - 1;
    }
  }
}

public ScriptedRandomSource ( ) { final String property = System . getProperty ( SCRIPTED_RANDOM_PROPERTY , "1,2,3" ) ; final int length = property . split ( "," ) . length ; final StringTokenizer tokenizer = new StringTokenizer ( property , "," ) ; m_numbers = new int [ length ] ; for ( int i = 0 ; i < m_numbers . length ; i ++ ) { final String token = tokenizer . nextToken ( ) ; if ( token . equals ( "e" ) ) { m_numbers [ i ] = ERROR ; } else if ( token . equals ( "p" ) ) { m_numbers [ i ] = PAUSE ; } else { m_numbers [ i ] = Integer . parseInt ( token ) - 1 ; } } }
create a scripted random source from the system property triplea . scriptedrandom .
