From 0b6a047cc0c6d9ffacfd94df32bb4dc31a098c76 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Tue, 21 Nov 2017 22:30:29 +0200 Subject: [PATCH] change time zone method name --- .../java/com/baeldung/timezonedisplay/TimezoneDisplay.java | 2 +- .../java/com/baeldung/timezonedisplay/TimezoneDisplayApp.java | 4 ++-- .../com/baeldung/timezonedisplay/TimezoneDisplayJava7.java | 2 +- .../com/baeldung/timezonedisplay/TimezoneDisplayJava7App.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplay.java b/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplay.java index ff618c8eea..3a1016c63b 100644 --- a/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplay.java +++ b/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplay.java @@ -14,7 +14,7 @@ public class TimezoneDisplay { GMT, UTC } - public List compileListFor(OffsetBase base) { + public List getTimeZoneList(OffsetBase base) { Set availableZoneIds = ZoneId.getAvailableZoneIds(); LocalDateTime now = LocalDateTime.now(); diff --git a/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayApp.java b/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayApp.java index 42a7a2ba85..6811d5ad22 100644 --- a/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayApp.java +++ b/core-java-8/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayApp.java @@ -8,11 +8,11 @@ public class TimezoneDisplayApp { TimezoneDisplay display = new TimezoneDisplay(); System.out.println("Time zones in UTC:"); - List utc = display.compileListFor(TimezoneDisplay.OffsetBase.UTC); + List utc = display.getTimeZoneList(TimezoneDisplay.OffsetBase.UTC); utc.forEach(System.out::println); System.out.println("Time zones in GMT:"); - List gmt = display.compileListFor(TimezoneDisplay.OffsetBase.GMT); + List gmt = display.getTimeZoneList(TimezoneDisplay.OffsetBase.GMT); gmt.forEach(System.out::println); } diff --git a/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7.java b/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7.java index 79f0729f32..4882ebe175 100644 --- a/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7.java +++ b/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7.java @@ -12,7 +12,7 @@ public class TimezoneDisplayJava7 { GMT, UTC } - public List compileListFor(TimezoneDisplayJava7.OffsetBase base) { + public List getTimeZoneList(TimezoneDisplayJava7.OffsetBase base) { String[] availableZoneIds = TimeZone.getAvailableIDs(); List result = new ArrayList<>(availableZoneIds.length); diff --git a/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7App.java b/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7App.java index 8f0acb38f3..9f20667660 100644 --- a/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7App.java +++ b/core-java/src/main/java/com/baeldung/timezonedisplay/TimezoneDisplayJava7App.java @@ -8,13 +8,13 @@ public class TimezoneDisplayJava7App { TimezoneDisplayJava7 display = new TimezoneDisplayJava7(); System.out.println("Time zones in UTC:"); - List utc = display.compileListFor(TimezoneDisplayJava7.OffsetBase.UTC); + List utc = display.getTimeZoneList(TimezoneDisplayJava7.OffsetBase.UTC); for (String timeZone : utc) { System.out.println(timeZone); } System.out.println("Time zones in GMT:"); - List gmt = display.compileListFor(TimezoneDisplayJava7.OffsetBase.GMT); + List gmt = display.getTimeZoneList(TimezoneDisplayJava7.OffsetBase.GMT); for (String timeZone : gmt) { System.out.println(timeZone); }