Because this object is immutable, it is safe to use from multiple threads and there's no need for "defensive copies."
Do not implement {@code ConfigValue}; it should only be implemented by the config library. Arbitrary implementations will not work because the library internals assume a specific concrete implementation. Also, this interface is likely to grow new methods over time, so third-party implementations will break.
Because this object is immutable, it is safe to use from multiple threads and there's no need for "defensive copies."
Do not implement {@code ConfigValue}; it should only be implemented by the config library. Arbitrary implementations will not work because the library internals assume a specific concrete implementation. Also, this interface is likely to grow new methods over time, so third-party implementations will break.
Because this object is immutable, it is safe to use from multiple threads and there's no need for "defensive copies."
Do not implement interface {@code ConfigValue}; it should only be implemented by the config library. Arbitrary implementations will not work because the library internals assume a specific concrete implementation. Also, this interface is likely to grow new methods over time, so third-party implementations will break.
This is designed to not have any dependencies on how the data is used, e.g. currently used to create the config XML file, in future will also be used to create the new config objects as well.
One interesting thing about this class is the lack of accessors and mutators for the majority of the data, this is done for readability and reflects the "data only" purpose of this class. Consider this a pedant trap :-).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|