| | |
| | | return turnMatrixNode == TurnNodeType.TURN.val; |
| | | } |
| | | |
| | | /** |
| | | * That vehicle is walking if the dynamic node count > 1 |
| | | */ |
| | | @SuppressWarnings("all") |
| | | public boolean isWalkingByVehicle(Integer lev, String vehicle) { |
| | | if (Cools.isEmpty(vehicle)) { |
| | | return false; |
| | | } |
| | | |
| | | lev = Optional.ofNullable(lev).orElse(MapDataDispatcher.MAP_DEFAULT_LEV); |
| | | DynamicNode[][] dynamicMatrix = mapDataDispatcher.getDynamicMatrix(lev); |
| | | |
| | | int count = 0; |
| | | for (int i = 0; i < dynamicMatrix.length; i++) { |
| | | for (int j = 0; j < dynamicMatrix[i].length; j++) { |
| | | if (vehicle.equals(dynamicMatrix[i][j].getVehicle())) { |
| | | count++; |
| | | if (count > 1) { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | public List<String> queryCodeListFromDynamicNode(Integer lev, String nodeType) { |
| | | if (Cools.isEmpty(nodeType)) { |
| | | return new ArrayList<>(); |