public Object nextObject(Random rnd,boolean allowNull){
  int[] types=randomType;
  int range=types.length;
  if (!allowNull)   range--;
  int type=types[rnd.nextInt(range)];
  return nextObject(rnd,type,allowNull);
}

public Object nextObject ( Random rnd , boolean allowNull ) { int [ ] types = randomType ; int range = types . length ; if ( ! allowNull ) range -- ; int type = types [ rnd . nextInt ( range ) ] ; return nextObject ( rnd , type , allowNull ) ; }
returns an object with a random type and random value .
