Advertisement
MrGG4ming

Untitled

Feb 6th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package com.terrains.users;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.HashMap;
  5. import java.util.List;
  6. import java.util.Map;
  7.  
  8. public class Regions {
  9.  
  10. private static List<Region> regions = new ArrayList<>();
  11. private static Map<String, Locations> points = new HashMap<>();
  12.  
  13. public static Map<String, Locations> getPoints() {
  14. return points;
  15. }
  16.  
  17. public static Region getRegion(String name) {
  18. for (Region region : getRegions()) {
  19. if (region.getName().equalsIgnoreCase(name)) {
  20. return region;
  21. }
  22. }
  23. return null;
  24. }
  25.  
  26. public static List<Region> getRegions() {
  27. return regions;
  28. }
  29.  
  30. public static void setRegions(List<Region> regions) {
  31. Regions.regions = regions;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement