Changeset View
Changeset View
Standalone View
Standalone View
app/src/main/java/it/reyboz/bustorino/backend/Palina.java
| Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | public int getMinNumberOfPassages(){ | ||||
| if( routes.size() == 0) min = 0; | if( routes.size() == 0) min = 0; | ||||
| else for (Route r : routes){ | else for (Route r : routes){ | ||||
| if(r.numPassaggi()>0) | if(r.numPassaggi()>0) | ||||
| min = Math.min(min,r.numPassaggi()); | min = Math.min(min,r.numPassaggi()); | ||||
| } | } | ||||
| if (min == Integer.MAX_VALUE) return 0; | if (min == Integer.MAX_VALUE) return 0; | ||||
| else return min; | else return min; | ||||
| } | } | ||||
| public ArrayList<String> getRoutesNamesWithNoPassages(){ | |||||
| ArrayList<String> mList = new ArrayList<>(); | |||||
| if(routes==null || routes.size() == 0){ | |||||
| return mList; | |||||
| } | |||||
| for(Route r: routes){ | |||||
| if(r.numPassaggi()==0) | |||||
| mList.add(r.getNameForDisplay()); | |||||
| } | |||||
| return mList; | |||||
| } | |||||
| //private void mergeRoute | //private void mergeRoute | ||||
| } | } | ||||
| No newline at end of file | No newline at end of file | ||||
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register