Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. package pl.edu.agh.iet.miles.master.model;
  2.  
  3. public class GeoLocationRequest {
  4.  
  5. public GeoLocationRequest(GeoCodeRq geoCodeRq) {
  6. this.geoCodeRq = geoCodeRq;
  7. }
  8.  
  9. public static GeoLocationRequest makeRequestForAirport(String airportCode){
  10. return new GeoLocationRequest(new GeoCodeRq(new PlaceById(airportCode, new BrowseCategory("AIR"))));
  11. }
  12.  
  13. private GeoCodeRq geoCodeRq;
  14.  
  15. private static class GeoCodeRq {
  16. private PlaceById placeById;
  17.  
  18. public GeoCodeRq(PlaceById placeById) {
  19. this.placeById = placeById;
  20. }
  21. }
  22.  
  23. private static class PlaceById {
  24. private String id;
  25. private BrowseCategory browseCategory;
  26.  
  27. public PlaceById(String id, BrowseCategory browseCategory) {
  28. this.id = id;
  29. this.browseCategory = browseCategory;
  30. }
  31. }
  32.  
  33. private static class BrowseCategory {
  34. private String name;
  35.  
  36. public BrowseCategory(String name) {
  37. this.name = name;
  38. }
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement