01: /*
02: * $Id: VariableValueMapImpl.java 667 2004-05-07 21:40:31Z mchenryc $
03: * IzPack
04: * Copyright (C) 2002 Johannes Lehtinen
05: *
06: * File : VariableValueMap.java
07: * Description : Map of variable values implementation.
08: * Author's email : johannes.lehtinen@iki.fi
09: * 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
37: VariableValueMap {
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: return getProperty(var);
47: }
48:
49: /**
50: * Sets a new value for the specified variable.
51: *
52: * @param var the name of the variable
53: * @param val the new value for the variable
54: */
55: public void setVariable(String var, String val) {
56: setProperty(var, val);
57: }
58: }
|