1616
1717package pl .wavesoftware .eid .impl ;
1818
19+ import pl .wavesoftware .eid .configuration .Configuration ;
1920import pl .wavesoftware .eid .configuration .ConfigurationBuilder ;
2021import pl .wavesoftware .eid .configuration .Formatter ;
2122import pl .wavesoftware .eid .configuration .UniqueIdGenerator ;
2223import pl .wavesoftware .eid .configuration .Validator ;
2324
2425import javax .annotation .Nullable ;
2526import java .util .Locale ;
27+ import java .util .TimeZone ;
2628
2729/**
2830 * @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
29- * @since 2018-10-29
31+ * @since 2.0.0
3032 */
3133final class ConfigurationImpl implements MutableConfiguration {
3234
@@ -36,6 +38,8 @@ final class ConfigurationImpl implements MutableConfiguration {
3638 private Validator validator ;
3739 @ Nullable
3840 private Locale locale ;
41+ @ Nullable
42+ private TimeZone zone ;
3943
4044 ConfigurationImpl () {
4145 // nothing here
@@ -45,7 +49,8 @@ final class ConfigurationImpl implements MutableConfiguration {
4549 this .formatter = settings .getFormatter ();
4650 this .generator = settings .getIdGenerator ();
4751 this .validator = settings .getValidator ();
48- this .locale = settings .getLocale ();
52+ this .locale = settings .getLocale ();
53+ this .zone = settings .getTimeZone ();
4954 }
5055
5156 @ Override
@@ -66,12 +71,23 @@ public ConfigurationBuilder locale(Locale locale) {
6671 return this ;
6772 }
6873
74+ @ Override
75+ public ConfigurationBuilder timezone (TimeZone zone ) {
76+ this .zone = zone ;
77+ return this ;
78+ }
79+
6980 @ Override
7081 public ConfigurationBuilder validator (Validator validator ) {
7182 this .validator = validator ;
7283 return this ;
7384 }
7485
86+ @ Override
87+ public Configuration getFutureConfiguration () {
88+ return this ;
89+ }
90+
7591 @ Override
7692 public Formatter getFormatter () {
7793 return formatter ;
@@ -93,4 +109,10 @@ public Validator getValidator() {
93109 public Locale getLocale () {
94110 return locale ;
95111 }
112+
113+ @ Nullable
114+ @ Override
115+ public TimeZone getTimeZone () {
116+ return zone ;
117+ }
96118}
0 commit comments