|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.browsecode.helpers.preferences.PreferencesFromFile
public class PreferencesFromFile
Preferences loads and saves prefs to a file for a particular program (or set of programs). It also automatically saves the preferences when the system exits. You may call "savePrefs()" if you want to, but you don't have to.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.browsecode.helpers.keyvalues.HasKeyValuesModifiable |
---|
HasKeyValuesModifiable.Hash |
Method Summary | |
---|---|
java.lang.Boolean |
getBooleanObjectPreference(java.lang.String key)
|
boolean |
getBooleanPreference(java.lang.String key)
Returns false if the value isn't in the database, by default. |
boolean |
getBooleanPreference(java.lang.String key,
boolean defaultValue)
Returns false if the value isn't in the database, by default. |
java.util.Vector<java.lang.Boolean> |
getBooleanPreferenceVector(java.lang.String key)
|
java.lang.Integer |
getIntegerPreference(java.lang.String key)
|
int |
getIntPreference(java.lang.String key)
Returns -1 if the value isn't in the database. |
java.lang.String |
getPreference(java.lang.String key)
|
java.lang.String[] |
getPreferenceList(java.lang.String key)
|
Preferences |
getPreferencesSubset(java.lang.String key)
|
Preferences |
getPreferencesSubsetFromVector(java.lang.String key,
int vectorIndex)
|
Preferences |
getPreferencesSubsetFromVectorName(java.lang.String vectorName)
|
Preferences |
getPreferencesSubsetFromVectorName(java.lang.String key,
java.lang.String vectorName)
|
java.util.Vector<java.lang.String> |
getPreferenceVector(java.lang.String key)
|
java.util.Vector<java.util.Vector<java.lang.String>> |
getPreferenceVectorOfVectors(java.lang.String key)
|
java.lang.String |
getValue(java.lang.String key)
|
static void |
main(java.lang.String[] args)
|
void |
removePreferenceVectorIndex(java.lang.String key,
int indexToDelete)
|
void |
savePrefs()
|
void |
setBooleanObjectPreference(java.lang.String key,
java.lang.Boolean value)
|
void |
setBooleanPreference(java.lang.String key,
boolean value)
|
void |
setBooleanPreferenceVector(java.lang.String key,
java.util.Vector<java.lang.Boolean> v)
|
void |
setIntegerPreference(java.lang.String key,
java.lang.Integer value)
|
void |
setIntPreference(java.lang.String key,
int value)
|
void |
setPreference(java.lang.String key,
java.lang.String value)
|
void |
setPreferenceList(java.lang.String key,
java.lang.String[] values)
|
void |
setPreferenceVector(java.lang.String key,
java.util.Vector<java.lang.String> v)
|
void |
setPreferenceVectorOfVectors(java.lang.String key,
java.util.Vector<java.util.Vector<java.lang.String>> v)
|
void |
setValue(java.lang.String key,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void savePrefs()
savePrefs
in interface Preferences
public java.lang.String[] getPreferenceList(java.lang.String key)
getPreferenceList
in interface Preferences
public void removePreferenceVectorIndex(java.lang.String key, int indexToDelete)
removePreferenceVectorIndex
in interface Preferences
public void setPreferenceVector(java.lang.String key, java.util.Vector<java.lang.String> v)
setPreferenceVector
in interface Preferences
public void setBooleanPreferenceVector(java.lang.String key, java.util.Vector<java.lang.Boolean> v)
setBooleanPreferenceVector
in interface Preferences
public void setPreferenceVectorOfVectors(java.lang.String key, java.util.Vector<java.util.Vector<java.lang.String>> v)
setPreferenceVectorOfVectors
in interface Preferences
public java.util.Vector<java.lang.String> getPreferenceVector(java.lang.String key)
getPreferenceVector
in interface Preferences
public java.util.Vector<java.lang.Boolean> getBooleanPreferenceVector(java.lang.String key)
getBooleanPreferenceVector
in interface Preferences
public java.util.Vector<java.util.Vector<java.lang.String>> getPreferenceVectorOfVectors(java.lang.String key)
getPreferenceVectorOfVectors
in interface Preferences
public int getIntPreference(java.lang.String key)
getIntPreference
in interface Preferences
key
-
public java.lang.Integer getIntegerPreference(java.lang.String key)
getIntegerPreference
in interface Preferences
public boolean getBooleanPreference(java.lang.String key)
getBooleanPreference
in interface Preferences
key
-
public boolean getBooleanPreference(java.lang.String key, boolean defaultValue)
getBooleanPreference
in interface Preferences
key
-
public java.lang.Boolean getBooleanObjectPreference(java.lang.String key)
getBooleanObjectPreference
in interface Preferences
public java.lang.String getPreference(java.lang.String key)
getPreference
in interface Preferences
public void setPreference(java.lang.String key, java.lang.String value)
setPreference
in interface Preferences
public void setIntPreference(java.lang.String key, int value)
setIntPreference
in interface Preferences
public void setIntegerPreference(java.lang.String key, java.lang.Integer value)
setIntegerPreference
in interface Preferences
public void setBooleanPreference(java.lang.String key, boolean value)
setBooleanPreference
in interface Preferences
public void setBooleanObjectPreference(java.lang.String key, java.lang.Boolean value)
setBooleanObjectPreference
in interface Preferences
public void setPreferenceList(java.lang.String key, java.lang.String[] values)
setPreferenceList
in interface Preferences
public Preferences getPreferencesSubset(java.lang.String key)
getPreferencesSubset
in interface Preferences
public Preferences getPreferencesSubsetFromVector(java.lang.String key, int vectorIndex)
getPreferencesSubsetFromVector
in interface Preferences
public Preferences getPreferencesSubsetFromVectorName(java.lang.String vectorName)
getPreferencesSubsetFromVectorName
in interface Preferences
public Preferences getPreferencesSubsetFromVectorName(java.lang.String key, java.lang.String vectorName)
getPreferencesSubsetFromVectorName
in interface Preferences
public void setValue(java.lang.String key, java.lang.String value)
setValue
in interface KeyValuesModifiable
public java.lang.String getValue(java.lang.String key)
getValue
in interface HasKeyValues
public static final void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |