Browse Source

feat: ajout multiples FAI pour un nom de zone

Martin Passard 7 years ago
parent
commit
b1419d9dae
1 changed files with 20 additions and 0 deletions
  1. 20 0
      src/main/Cache.java

+ 20 - 0
src/main/Cache.java

@@ -284,7 +284,27 @@ public class Cache implements AffichableSurIRC {
 		}
 		}
 
 
 		return null;
 		return null;
+	}
+	
+	public List<ISP> getMultipleISPWithGeoZone(String s){
+		List<ISP> res = new ArrayList<>();
+		for(ISP i: cache) {
+			if(Main.isDebug()) {
+				System.out.println("Recherche sur "+i.getBetterName());
+			}
+			if(i.getCoveredAreas()!= null) for(CoveredAreas ca : i.getCoveredAreas()) {
+				if(Main.isDebug()) {
+					ca.getName();
+				}
+				String name = ca.getName().toLowerCase();
+				s = s.toLowerCase();
+				if(name.contains(s)) {
+					res.add(i);
+				}
+			}
 
 
+		}
+		return res;
 	}
 	}
 	
 	
 	/**
 	/**