1 package com.pathfinder.internal; 2 3 import java.util.ArrayList; 4 import java.util.Arrays; 5 import java.util.List; 6 import java.util.Random; 7 8 public class GraphDAO { 9 10 private static final Random random = new Random(); 11 12 public List<String> listLocations() { 13 return new ArrayList<String>(Arrays.asList( 14 "CNHKG", "AUMEL", "SESTO", "FIHEL", "USCHI", "JNTKO", "DEHAM", "CNSHA", "NLRTM", "SEGOT", "CNHGH", "USNYC", "USDAL" 15 )); 16 } 17 18 public String getVoyageNumber(String from, String to) { 19 final int i = random.nextInt(5); 20 if (i == 0) return "0100S"; 21 if (i == 1) return "0200T"; 22 if (i == 2) return "0300A"; 23 if (i == 3) return "0301S"; 24 return "0400S"; 25 } 26 27 }