~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/common/org/crosswire/common/config/PathChoice.java

  • Committer: joe
  • Date: 2002-10-08 21:36:18 UTC
  • Revision ID: svn-v4:a88caf3b-7e0a-0410-8d0d-cecb45342206:trunk:80
big config and comment update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
package org.crosswire.common.config;
 
3
 
 
4
import java.io.File;
 
5
 
 
6
import org.crosswire.common.util.Convert;
 
7
 
 
8
/**
 
9
 * A class to convert between strings and objects of a type
 
10
 * 
 
11
 * <p><table border='1' cellPadding='3' cellSpacing='0'>
 
12
 * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
 
13
 *
 
14
 * Distribution Licence:<br />
 
15
 * JSword is free software; you can redistribute it
 
16
 * and/or modify it under the terms of the GNU General Public License,
 
17
 * version 2 as published by the Free Software Foundation.<br />
 
18
 * This program is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
21
 * General Public License for more details.<br />
 
22
 * The License is available on the internet
 
23
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
 
24
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
25
 * MA 02111-1307, USA<br />
 
26
 * The copyright to this program is held by it's authors.
 
27
 * </font></td></tr></table>
 
28
 * @see docs.Licence
 
29
 * @author Joe Walker [joe at eireneh dot com]
 
30
 * @version $Id$
 
31
 */
 
32
public class PathChoice extends ReflectedChoice
 
33
{
 
34
    public Class getConvertionClass()
 
35
    {
 
36
        return String[].class;
 
37
    }
 
38
 
 
39
    public String convertToString(Object orig)
 
40
    {
 
41
        return Convert.stringArray2String((String[]) orig, File.pathSeparator);
 
42
    }
 
43
 
 
44
    public Object convertToObject(String orig)
 
45
    {
 
46
        return Convert.string2StringArray(orig, File.pathSeparator);
 
47
    }
 
48
}