Stay organized with collections
Save and categorize content based on your preferences.
PreferencesFactory
public
interface
PreferencesFactory
java.util.prefs.PreferencesFactory
|
A factory object that generates Preferences objects. Providers of
new Preferences
implementations should provide corresponding
PreferencesFactory implementations so that the new
Preferences implementation can be installed in place of the
platform-specific default implementation.
This class is for Preferences implementers only.
Normal users of the Preferences facility should have no need to
consult this documentation.
Summary
Public methods
systemRoot
public abstract Preferences systemRoot ()
Returns the system root preference node. (Multiple calls on this
method will return the same object reference.)
userRoot
public abstract Preferences userRoot ()
Returns the user root preference node corresponding to the calling
user. In a server, the returned value will typically depend on
some implicit client-context.
Returns |
Preferences |
the user root preference node corresponding to the calling
user |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PreferencesFactory\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nPreferencesFactory\n==================\n\n\n`\npublic\n\n\ninterface\nPreferencesFactory\n`\n\n\n`\n\n\n`\n\n|------------------------------------|\n| java.util.prefs.PreferencesFactory |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA factory object that generates Preferences objects. Providers of\nnew [Preferences](/reference/java/util/prefs/Preferences) implementations should provide corresponding\nPreferencesFactory implementations so that the new\nPreferences implementation can be installed in place of the\nplatform-specific default implementation.\n\n**This class is for Preferences implementers only.\nNormal users of the Preferences facility should have no need to\nconsult this documentation.** \n**See also:**\n\n- [Preferences](/reference/java/util/prefs/Preferences)\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Preferences](/reference/java/util/prefs/Preferences) | ` `[systemRoot](/reference/java/util/prefs/PreferencesFactory#systemRoot())`() ` Returns the system root preference node. |\n| ` abstract `[Preferences](/reference/java/util/prefs/Preferences) | ` `[userRoot](/reference/java/util/prefs/PreferencesFactory#userRoot())`() ` Returns the user root preference node corresponding to the calling user. |\n\nPublic methods\n--------------\n\n### systemRoot\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract Preferences systemRoot ()\n```\n\nReturns the system root preference node. (Multiple calls on this\nmethod will return the same object reference.)\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------|----------------------------------------|\n| [Preferences](/reference/java/util/prefs/Preferences) | the system root preference node \u003cbr /\u003e |\n\n### userRoot\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract Preferences userRoot ()\n```\n\nReturns the user root preference node corresponding to the calling\nuser. In a server, the returned value will typically depend on\nsome implicit client-context.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------|------------------------------------------------------------------------|\n| [Preferences](/reference/java/util/prefs/Preferences) | the user root preference node corresponding to the calling user \u003cbr /\u003e |"]]