01: // Space4J(TM) - Object Persistence in RAM
02: // Copyright (C) 2003 Sergio Oliveira Junior
03: // This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
04:
05: package org.space4j.commands;
06:
07: import org.space4j.*;
08:
09: import java.util.*;
10:
11: public class MapCreateCmd extends Command {
12:
13: private Object key;
14: private Map map;
15:
16: public MapCreateCmd(Object key, Map map) {
17: this .key = key;
18: this .map = map;
19: }
20:
21: public int execute(Space space) throws CommandException {
22: space.putObject(key, map);
23: return 1;
24: }
25:
26: }
|