root / import / ext3D / trunk / install-extension3d / IzPack / src / lib / com / izforge / izpack / installer / VariableValueMapImpl.java @ 15280
History | View | Annotate | Download (2.04 KB)
1 |
/*
|
---|---|
2 |
* $Id: VariableValueMapImpl.java,v 1.1 2006/06/14 07:29:07 cesar Exp $
|
3 |
* IzPack
|
4 |
* Copyright (C) 2002 Johannes Lehtinen
|
5 |
*
|
6 |
* File : VariableValueMap.java
|
7 |
* Description : Map of variable values implementation.
|
8 |
* Author's email : johannes.lehtinen@iki.fi
|
9 |
* Author's Website : http://www.iki.fi/jle/
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
24 |
*/
|
25 |
package com.izforge.izpack.installer; |
26 |
|
27 |
import java.util.Properties; |
28 |
|
29 |
/**
|
30 |
* A Properties based implementation for VariableValueMap interface.
|
31 |
*
|
32 |
* @author Johannes Lehtinen <johannes.lehtinen@iki.fi>
|
33 |
* @deprecated Use a Properties object instead. Methods in IzPack which accept or return
|
34 |
* VariableValueMap have been deprecated in favor of versions which use Properties.
|
35 |
*/
|
36 |
public final class VariableValueMapImpl extends Properties implements VariableValueMap |
37 |
{ |
38 |
|
39 |
/**
|
40 |
* Returns the current value for the specified variable.
|
41 |
*
|
42 |
* @param var the name of the variable
|
43 |
* @return the current value or null if not set
|
44 |
*/
|
45 |
public String getVariable(String var) |
46 |
{ |
47 |
return getProperty(var);
|
48 |
} |
49 |
|
50 |
|
51 |
/**
|
52 |
* Sets a new value for the specified variable.
|
53 |
*
|
54 |
* @param var the name of the variable
|
55 |
* @param val the new value for the variable
|
56 |
*/
|
57 |
public void setVariable(String var, String val) |
58 |
{ |
59 |
setProperty(var, val); |
60 |
} |
61 |
} |
62 |
|