BAEL-1317: Moving Java7 example to `core-java` module
This commit is contained in:
parent
dbee97c1c1
commit
12567132b1
|
@ -8,6 +8,10 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class TimezoneDisplayJava7 {
|
public class TimezoneDisplayJava7 {
|
||||||
|
|
||||||
|
public enum OffsetBase {
|
||||||
|
GMT, UTC
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> compileListFor(TimezoneDisplayJava7.OffsetBase base) {
|
public List<String> compileListFor(TimezoneDisplayJava7.OffsetBase base) {
|
||||||
String[] availableZoneIds = TimeZone.getAvailableIDs();
|
String[] availableZoneIds = TimeZone.getAvailableIDs();
|
||||||
List<String> result = new ArrayList<>(availableZoneIds.length);
|
List<String> result = new ArrayList<>(availableZoneIds.length);
|
||||||
|
@ -36,8 +40,4 @@ public class TimezoneDisplayJava7 {
|
||||||
return String.format("%+03d:%02d", hours, Math.abs(minutes));
|
return String.format("%+03d:%02d", hours, Math.abs(minutes));
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum OffsetBase {
|
|
||||||
GMT, UTC
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue