FUEL/0.1/API/Preferences
Jump to navigation
Jump to search
(This is just so that we can plan out the structure of the preferences area.)
Notes:
- Is name the best name for the Preferences branch?
- The branch, events, and type properties of Preference should be lazy loaded
- prefs.has() and prefs.get() should check the input string to see if the current branch is already defined (e.g. the branch is "foo.bar" - but the user provides "foo.bar.baz")
- getValue/setValue need to exist since getting/setting non-existent preferences is too valuable an operation
PreferenceBranch( String )
Properties:
rootis aString[readonly]allis aArray<Preference>[readonly]eventsis anEvents
Methods:
has( String )returns aBooleanget( String )returns aPreferencegetValue( String, Object )returns anObjectsetValue( String, Object )reset()
Preference( String, PreferenceBranch )
Properties:
nameis aString[readonly]typeis aString[readonly]valueis anObject[read/write]lockedis aBoolean[read/write]defaultis aBoolean[readonly]branchis aPreferenceBrancheventsis anEvents
Methods:
reset()