KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > presumo > util > config > Preferences


1 /**
2  * This file is part of Presumo.
3  *
4  * Presumo is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * Presumo is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Presumo; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  *
19  * Copyright 2001 Dan Greff
20  */

21 package com.presumo.util.config;
22
23 import java.util.Enumeration JavaDoc;
24
25 /**
26  * Interface to retrieve configuration information this JMS implementation
27  * and plugin extensions use.
28  */

29 public interface Preferences
30 {
31   
32   /**
33    * Retrieves the value for the given key.
34    *
35    * @returns The value for the key if it exists, else null.
36    */

37   public String JavaDoc get(String JavaDoc key);
38   
39   /**
40    * Retrieves the value for the given key if it exists. If the key does
41    * not exist the specified default value is returned.
42    *
43    * @returns The value for the key if it exists, else the
44    * the specified default value is returned.
45    */

46   public String JavaDoc get(String JavaDoc key, String JavaDoc defaultValue);
47   
48   /**
49    * Creates an enumeration of all of the property names contained in this
50    * preference object.
51    *
52    * @return Enumeration over the property names.
53    */

54   public Enumeration JavaDoc names();
55   
56 }
57
Popular Tags