📄 propertiessupport.java
字号:
/*
* Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.mandarax.kernel;
import java.util.*;
/**
* Interface that can be extended/implemented by all interfaces/classes that want
* to equip their respective instances with an additional parameter facility.
* Parameters are simple key-value pairs, both key and value are strings.
* Implementations can use a java.util.Properties delegate.
* @see java.util.Properties
* @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
* @version 3.4 <7 March 05>
* @since 2.0
*/
public interface PropertiesSupport {
/**
* Set a property.
* @param key the key
* @param value the value
* @return the previous value of the specified key in this property list, or null if it did not have one.
*/
Object setProperty(String key,String value);
/**
* Get a property.
* @param key the property key
* @return the respective value. The method returns null if the property is not found.
*/
String getProperty(String key);
/**
* Remove a property.
* @param key the property key
* @return the value to which the key had been mapped, or null if the key did not have a mapping.
*/
Object removeProperty(String key);
/**
* Returns an enumeration of all the keys in this property list, including distinct
* keys in the default property list if a key of the same name has not already been
* found from the main properties list.
* @return an enumeration of all the keys in this property list, including the keys in
* the default property list
*/
Enumeration propertyNames();
/**
* Get the properties as one "properties" instance.
* @return a properties instance
*/
Properties getProperties();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -