Changeset 34309 in osm for applications/editors/josm/plugins/indoorhelper/src/model
- Timestamp:
- 2018-06-17T17:51:18+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/indoorhelper/src/model/IndoorLevel.java
r32637 r34309 115 115 } 116 116 } 117 118 public static boolean isPartOfWorkingLevel(String vals, int level) { 119 for (String val : vals.split(";")) { 120 int firstVal, secVal; 121 122 //Extract values 123 if (val.indexOf("-") == 0) { 124 firstVal = (Integer.parseInt(val.split("-", 2)[1].split("-", 2)[0]))*-1; 125 secVal = Integer.parseInt(val.split("-", 2)[1].split("-", 2)[1]); 126 } else if (val.contains("-")) { 127 firstVal = Integer.parseInt(val.split("-")[0]); 128 secVal = Integer.parseInt(val.split("-")[1]); 129 } else { 130 firstVal = Integer.parseInt(val); 131 secVal = firstVal; 132 } 133 134 // Compare values to current working level 135 if (level >= firstVal && level <= secVal) { 136 return true; 137 } 138 } 139 140 return false; 141 } 117 142 }
Note:
See TracChangeset
for help on using the changeset viewer.