KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > preferences > PreferenceFilterEntry


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.runtime.preferences;
12
13 /**
14  * Class which represents and preference filter entry to be used during preference
15  * import/export (for example).
16  *
17  * @since 3.1
18  * @see org.eclipse.core.runtime.preferences.IPreferenceFilter
19  */

20 public final class PreferenceFilterEntry {
21
22     private String JavaDoc key;
23
24     /**
25      * Constructor for the class. Create a new preference filter entry with the given
26      * key. The key must <em>not</em> be <code>null</code> or empty.
27      *
28      * @param key the name of the preference key
29      */

30     public PreferenceFilterEntry(String JavaDoc key) {
31         super();
32         if (key == null || key.length() == 0)
33             throw new IllegalArgumentException JavaDoc();
34         this.key = key;
35     }
36
37     /**
38      * Return the name of the preference key for this filter entry.
39      * It will <em>not</em> return <code>null</code> or the
40      * empty string.
41      *
42      * @return the name of the preference key
43      */

44     public String JavaDoc getKey() {
45         return key;
46     }
47 }
48
Popular Tags