The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Search
Feedback


Interface calypso.util.Preferences

All Packages  This Package  Class Hierarchy  Class Search  Index

Interface calypso.util.Preferences

This is an interface to get things from the Preferences database.

See Also: PreferencesFactory


public interface  Preferences
{
          // Methods 12
     public abstract void addDefaults(Properties);
     public abstract Properties getAsProperties();
     public abstract boolean getBoolean(String);
     public abstract boolean getBoolean(String, boolean);
     public abstract File getFile(String, File);
     public abstract int getInt(String);
     public abstract int getInt(String, int);
     public abstract String getString(String);
     public abstract String getString(String, String);
     public abstract void putBoolean(String, boolean);
     public abstract void putInt(String, int);
     public abstract void putString(String, String);
}



Methods


addDefaults

   public abstract void addDefaults(Properties defs) 

Add a table of default values. You must add defaults for each preference you use.



getString

   public abstract String getString(String prefname, 
                                    String defaultValue) 

Given a name of a preference, return its value as a String. If it's not defined, return the given default.



getString

   public abstract String getString(String prefname) 

Given a name of a preference, return its value as a String.



getInt

   public abstract int getInt(String prefname, 
                              int defaultValue) 

Given a name of a preference, return its value as an int. If it's not defined, return the given default.



getInt

   public abstract int getInt(String prefname) 

Given a name of a preference, return its value as an int.



getBoolean

   public abstract boolean getBoolean(String prefname, 
                                      boolean defaultValue) 

Given a name of a preference, return its value as a boolean. If it's not defined, return the given default.



getBoolean

   public abstract boolean getBoolean(String prefname) 

Given a name of a preference, return its value as a boolean.



getFile

   public abstract File getFile(String prefname, 
                                File defaultValue) 

Given a name of a preference, return its value as an File. If it's not defined, return the given default.



putString

   public abstract void putString(String prefname, 
                                  String value) 

Assign a String value to the given preference.



putInt

   public abstract void putInt(String prefname, 
                               int value) 

Assign an int value to the given preference.



putBoolean

   public abstract void putBoolean(String prefname, 
                                   boolean value) 

Assign a boolean value to the given preference.



getAsProperties

   public abstract Properties getAsProperties() 

Return the preferences as a Properties object



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4



Copyright © 1998 The Mozilla Organization.