Skip to content

Instantly share code, notes, and snippets.

@jsmithdev
Created September 28, 2021 14:01
Show Gist options
  • Save jsmithdev/815340a1ab5b0dd1402ef4f88c9ed8de to your computer and use it in GitHub Desktop.
Save jsmithdev/815340a1ab5b0dd1402ef4f88c9ed8de to your computer and use it in GitHub Desktop.

Revisions

  1. jsmithdev created this gist Sep 28, 2021.
    18 changes: 18 additions & 0 deletions getRandomAddress.cls
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    /**
    * get a pseudo random address
    * @param {Integer} val - number to decide what address to return
    * @return {String} - address
    */
    public static String getRandomAddress(Integer val) {
    Integer i = Integer.valueOf(String.valueOf(val).right(1));// get last num; 3, 223, 113 would be 3;
    if(i == 0){ return '61 North Avenue NW, Atlanta, GA, 30308'; }
    if(i == 1){ return '210 Peachtree St NW, Atlanta, GA, 30303'; }
    if(i == 2){ return '12 Cobb Pkwy SE, Marietta, GA, 30062'; }
    if(i == 3){ return '6000 N Terminal Pkwy, Atlanta, GA, 30320'; }
    if(i == 4){ return '1280 Peachtree St NE, Atlanta, GA, 30309'; }
    if(i == 5){ return '225 Baker St NW, Atlanta, GA, 30313'; }
    if(i == 6){ return '800 Cherokee Ave SE, Atlanta, GA, 30315'; }
    if(i == 7){ return '1 AMB Dr NW, Atlanta, GA, 30313'; }
    if(i == 8){ return '3652 Roswell Rd, Atlanta, GA, 30342'; }
    return '878 Peachtree St NE, Atlanta, GA, 30309';
    }