Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentLinkMenuExpand(external link)DocumentSearchCopyCopied
Developer Documentation

Mutable preferences objects

Context and Problem Statement

To create an immutable preferences object every time seems to be a waste of time and computer memory.

Considered Options

  • Alter the existing object and return it (by awith* -method, similar to a builder, but changing the object at hand).
  • Create a new object every time a preferences object should be altered.

Decision Outcome

Chosen option: “Alter the exiting object”, because the preferences objects are just wrappers around the basic preferences framework of JDK. They should be mutable on-the-fly similar to objects with a Builder inside and to be stored immediately again in the preferences.



[8]ページ先頭

©2009-2025 Movatter.jp