[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/profile ProfileConfiguration.java,1
Status: Beta
Brought to you by:
huston
From: Huston F. <hu...@us...> - 2001-11-09 18:41:26
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile In directory usw-pr-cvs1:/tmp/cvs-serv32503/src/org/beepcore/beep/profile Modified Files: ProfileConfiguration.java Log Message: Changed ProfileConfiguration to not inherit from Properties Index: ProfileConfiguration.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/ProfileConfiguration.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ProfileConfiguration.java 2001/11/08 05:51:34 1.2 --- ProfileConfiguration.java 2001/11/09 18:41:23 1.3 *************** *** 19,23 **** ! import java.util.*; --- 19,24 ---- ! import java.util.Enumeration; ! import java.util.Properties; *************** *** 30,33 **** * at will. */ ! public class ProfileConfiguration extends Properties { } --- 31,83 ---- * at will. */ ! public class ProfileConfiguration { ! private Properties props = new Properties(); ! ! public ProfileConfiguration() { ! } ! ! /** ! * Searches for the property with the specified key in this ! * ProfileConfiguration. ! * ! * @param key the property key. ! * @return the value in this configuration list with the ! * specified key value or null if it is not found. ! */ ! public String getProperty(String key) { ! return props.getProperty(key); ! } ! ! /** ! * Searches for the property with the specified key in this ! * ProfileConfiguration. If the key is not found in this ! * ProfileConfiguration <code>defaultValue</code> is returned. ! * ! * @param key the property key. ! * @param defaultValue a default value. ! * @return the value in this configuration list with the ! * specified key value or <code>defaultValue</code> ! * if it is not found. ! */ ! public String getProperty(String key, String defaultValue) { ! return props.getProperty(key); ! } ! ! /** ! * Returns an enumeration of all the keys in this ProfileConfiguration. ! */ ! public Enumeration propertyNames() { ! return props.propertyNames(); ! } ! ! /** ! * Stores the value with the associated key in this ProfileConfiguration. ! * ! * @return the previous value of the specified key in this ! * ProfileConfiguration, or <code>null</code> if it did not have ! * one. ! */ ! public String setProperty(String key, String value) { ! return (String)props.setProperty(key, value); ! } } |