/** * Generates a pseudorandom country. * * @return Half the time, USA; otherwise, a random string. */ public String country() { String country = "USA"; int toggle = this._random.random(0, 1); if (toggle == 0) { StringBuilder buffer = new StringBuilder(255); country = RandomUtil.randomName(this._random, buffer, 6, 16).toString(); } return country; }
/** * Generates the first line of a pseudorandom street address. * * @return A random street address. */ public String street1() { StringBuilder buffer = new StringBuilder(255); buffer.append(this._random.makeNString(1, 5)).append(' '); // Number RandomUtil.randomName(this._random, buffer, 1, 11); // Street Name String[] STREETEXTS = {"Blvd", "Ave", "St", "Ln", ""}; String streetExt = STREETEXTS[this._random.random(0, STREETEXTS.length - 1)]; if (streetExt.length() > 0) { buffer.append(' ').append(streetExt); } return buffer.toString(); }