public ArrayList<Short> getPrefTransportAccess() { ArrayList<Short> result = new ArrayList<Short>(householdPrefs.size()); for (HouseholdPrefs prefs : householdPrefs) { result.add(prefs.getPrefTransportAccess()); } return result; }
public ArrayList<Short> getPrefSocialPrestige() { ArrayList<Short> result = new ArrayList<Short>(householdPrefs.size()); for (HouseholdPrefs prefs : householdPrefs) { result.add(prefs.getPrefSocialPrestige()); } return result; }
public HouseholdPrefs lookupHouseholdTypePrefs(HouseholdType householdType) { HouseholdPrefs lookupHouseholdPrefs = new HouseholdPrefs(); lookupHouseholdPrefs.setHouseholdTypeId(householdType.getId()); int posHHType = Collections.binarySearch(householdPrefs, lookupHouseholdPrefs); assert posHHType >= 0 : "No household preference data found for hh type " + householdType.toString(); return householdPrefs.get(posHHType); }