📄 configuration.java
字号:
* @param name
* @param defaultValue
* @return
*/
public double getDoubleProperty(String name, double defaultValue);
/**
* Wrapper method to Category method
*
* @param name
* @param defaultValue
* @param category
* @return
*/
public double getDoubleProperty(String name,double defaultValue,String category);
/**
* Wrapper method to Category method
*
* @param name
* @param defaultValue
* @return
*/
public char getCharProperty(String name, char defaultValue);
/**
* Wrapper method to Category method
*
* @param name
* @param defaultValue
* @param category
* @return
*/
public char getCharProperty(String name,char defaultValue,String category);
/**
* This method creates a string representation of the configuration.
*
* @return a string with the configuration
*/
public String toString();
/**
* This method converts the Configuration into a String
* which looks like XML.
*
* @return the Configuration as String in XML format
*/
public String getXMLAsString();
/**
* Adds the PropertyListener to the main category.
*
* If the main category changes after the listener has
* already been added, the listener is still registered,
* but not to the main category any longer. One way to
* handle this behavior is to remove the listener from
* the old main category and add it to the new main
* category.
*
* @param listener
*/
public void addPropertyListener(PropertyListener listener);
/**
* Adds the PropertyListener to the given category.
*/
public void addPropertyListener(PropertyListener listener, String categoryName);
/**
* Return the name of the current configuration.
* @return
*/
public String getConfigName();
/**
* Sets the name of the configuration.
*
* @param configName
*/
public void setConfigName(String configName);
/**
* Adds the specified configuration listener to receive configuration
* changed events from this configuration.
*
* @param listener The ConfigurationListener
*/
public void addConfigurationListener(ConfigurationListener listener);
/**
* Removes the specified configuration listener from the configuration
* change events from this configuration.
*
* @param listener The ConfigurationListener
*/
public void removeConfigurationListener(ConfigurationListener listener);
/**
* Deliver configuration changed event to all listeners that are registered
* with our listener list.
*
* @param event The ConfigurationChangedEvent
*/
public void fireConfigurationChangedEvent(ConfigurationChangedEvent event);
/**
* Returns the main category for this configuration
*
* @return The main category
*/
public Category getCategory();
/**
* Returns a category based on the name provided.
* @param name The name of the category (if null, main category will be used)
* @return The category object (new instance if necessary)
*/
public Category getCategory(String name);
/**
* Wrapper method to Category method
*
* @param key
* @param value
*/
public void setLongProperty(String key, long value);
/**
* Wrapper method to Category method
*
* @param key
* @param value
*/
public void setIntProperty(String key, int value);
/**
* Wrapper method to Category method
*
* @param key
* @param value
*/
public void setCharProperty(String key, char value);
/**
* Wrapper method to Category method
*
* @param key
* @param value
* @param category
*/
public void setCharProperty(String key, char value, String category);
/**
* Wrapper method to Category method
*
* @param key
* @param value
*/
public void setDoubleProperty(String key, double value);
/**
* Wrapper method to Category method
*
* @param key
* @param value
* @param category
*/
public void setLongProperty(String key, long value, String category);
/**
* Wrapper method to Category method
*
* @param key
* @param value
* @param category
*/
public void setIntProperty(String key, int value, String category);
/**
* Wrapper method to Category method
*
* @param key
* @param value
* @param category
*/
public void setDoubleProperty(String key, double value, String category);
/**
* This methods returns a flag which indicates if the configuration
* has changed since it was loaded.
*
* @return true if the configuration has changed
*/
public boolean hasChanged();
/**
* @param key
* @return
*/
public String[] getArray(String key);
/**
* @param key
* @param defaultValue
* @return
*/
public String[] getArray(String key,String[] defaultValue);
/**
* @param key
* @param defaultValue
* @param category
* @return
*/
public String[] getArray(String key,String[] defaultValue,String category);
/**
* This method determines if the configuration was loaded successfully (returns false)
* or if the configuration was created by the ConfigurationManager.
*
* @return true if created by the ConfigurationManager
*/
public boolean isNew();
/**
* This method is used by the handlers to reset the isNew flag to false. This
* indicates that the configuration was loaded and not created.
*/
public void resetCreated();
public void setEncoding(String encoding);
public String getEncoding();
public void addCategoryListener(CategoryListener listener);
public void addCategoryListener(CategoryListener listener,String categoryName);
/**
* Use this method to determine if a category exists. The getCategory method
* will return the default category if the requested category was not found.
* So if you need to know if a category already exists then call this method.
*/
public boolean containsCategory(String categoryName);
public void addInclude(int type,String name);
public Vector getIncludes();
/**
* This method is used to define the base configuration of a configuration.
* This means if config A extends config B then this method will be called
* in config A with the name of config B.
*/
public void setBaseConfiguration(String name);
public String getBaseConfiguration();
public void renameCategory(String newName,String oldName);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -