| | |
| | | Point tempPoint = new Point(Integer.valueOf(split[0]),Integer.valueOf(split[1])); |
| | | List<BattMonsLocation> battGroupLocations = batteryLocations.stream().filter(location -> location.getBattGroupId().intValue() == alarm.getBattGroupId()).collect(Collectors.toList()); |
| | | for (int i = 0; i < battGroupLocations.size(); i++) { |
| | | BattMonsLocation battMonsLocation = batteryLocations.get(i); |
| | | BattMonsLocation battMonsLocation = battGroupLocations.get(i); |
| | | String battMonsPoints = battMonsLocation.getBattMonsPoints(); |
| | | //battMonsPoints为四边形的四个坐标点,示例: x1*y1,x2*y2,x3*y3,x4*y4 |
| | | |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String battMonsPoints = "0*0,0*4,4*4,4*0"; |
| | | String tempPointStr = "1*4"; |
| | | String battMonsPoints = "105*81,112*24,146*52,138*100"; |
| | | String tempPointStr = "117*47"; |
| | | |
| | | // 解析四边形的四个顶点坐标 |
| | | String[] points = battMonsPoints.split(","); |