1 package jimm.datavision.testdata; 2 import java.util.ArrayList ; 3 import java.util.Iterator ; 4 5 11 public class Office { 12 13 public static final int NUM_OFFICES = 3; 14 15 public int id; 16 public String name, abbrev, fax, email; 17 public boolean visible; 18 19 24 public static Iterator offices() { 25 ArrayList offices = new ArrayList (); 26 offices.add(new Office(1, "New York", "NY", "(212) 555-1234", 27 "nyc_jobs@example.com", true)); 28 offices.add(new Office(2, "New Jersey", "NJ", "(973) 555-1234", 29 "nj_jobs@example.com", true)); 30 offices.add(new Office(3, "Chicago", "Chicago", "(312) 555-1234", 31 "chicago_jobs@example.com", true)); 32 return offices.iterator(); 33 } 34 35 public Office(int i, String n, String a, String f, String e, boolean v) { 36 id = i; name = n; abbrev = a; fax = f; email = e; visible = v; 37 } 38 39 } 40 | Popular Tags |