forked from ldsimonassi/Storm-Search-Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7f6bb3
commit 09ff367
Showing
2 changed files
with
88 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package search; | ||
|
||
public class RandomItemsPopulator { | ||
public static String[] possibleWords= new String[] { | ||
"dvd", "laptop", "usb", "home", "theater", "sound", | ||
"notebook", "17", "15", "14", "ipod", "iphone", | ||
"mac", "pava", "mate", "bombilla", | ||
"aire", "acondicionado", "departamento", | ||
"casa", "cochera", "silla", "sillon", "mesa", "cable", | ||
"cortina", "lavarropa", "lavavajilla", | ||
"televisor", "led", "lcd", "ambientes", | ||
"cuadro", "decoracion", "pintura", "jarron", "escultura", | ||
"ventana", "vidrio", "aluminio", "pvc", | ||
"nokia", "1100", "blackberry", "curve", | ||
"android", "samsung", "galaxy", "sII", "windows", "mobile", | ||
"aeromodelismo", "automodelismo", "bateria", | ||
"motor", "control", "remoto", "alas", "avion", "pilas", | ||
"combustible", "autos", "peugeot", "206", "207", | ||
"307", "308", "407", "408", "fiat", "uno", "palio", | ||
"siena", "linea", "stilo", "idea", | ||
"chevrolet", "corsa", "agile", "aveo", "vecra", | ||
"astra", "cruze", "captiva", "volkswagen", "gol", "trend", | ||
"power", "fox", "suran", "bora", "vento", "passat", "cc", | ||
"tiguan", "touareg", "ford", "fiesta", "ka", "kinetic", | ||
"design", "focus", "mondeo", "ecosport", "kuga" | ||
}; | ||
|
||
|
||
public static int MAX_WORDS= 10; | ||
|
||
|
||
public static String getRandomTitle(){ | ||
int cantWords= (int)(Math.random()*(MAX_WORDS-1))+1; | ||
String res= ""; | ||
for(int i= 0; i< cantWords; i++){ | ||
int ind= (int)(Math.random()*(possibleWords.length-1)); | ||
res+=possibleWords[ind]+" "; | ||
} | ||
return res; | ||
} | ||
} |