From 1d48c425a902ae4b7c52167cae6c305da611fad3 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 18 Aug 2023 16:58:39 +0900 Subject: [PATCH] =?UTF-8?q?Petition.Violation.getVehicleNoDatetimes()=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/interfaces/smg/Petition.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/main/java/cokr/xit/interfaces/smg/Petition.java b/src/main/java/cokr/xit/interfaces/smg/Petition.java index d4294d6..2bcf712 100644 --- a/src/main/java/cokr/xit/interfaces/smg/Petition.java +++ b/src/main/java/cokr/xit/interfaces/smg/Petition.java @@ -708,10 +708,10 @@ public class Petition extends AbstractEntity { .replaceAll("[: /]", "") .split(","); - HashMap info = new HashMap<>(); - info.put("datetime", found[0]); - info.put("vehicleNo", found.length > 1 ? found[1] : ""); - list.add(info); + list.add(Map.of( + "datetime", found[0], + "vehicleNo", found.length > 1 ? found[1] : "" + )); } return list; } @@ -816,11 +816,4 @@ public class Petition extends AbstractEntity { return pattern.matcher(str); } } - - public static void main(String[] args) { - String[] locations = {"경기도 파주시 금촌동 798", "경기도 파주시 문산읍 당동리 892", "경기도 파주시 월롱면 덕은리 1300"}; - Violation v = new Violation(); - for (String loc: locations) - System.out.println(v.getDong(loc)); - } } \ No newline at end of file