Gridarta Editor
TestGameObjectParser.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.model.io;
21 
22 import java.util.LinkedHashMap;
23 import java.util.Map;
29 import org.jetbrains.annotations.NotNull;
30 
35 public class TestGameObjectParser extends AbstractGameObjectParser<TestGameObject, TestMapArchObject, TestArchetype> {
36 
44  super(gameObjectFactory, archetypeSet);
45  }
46 
47  @NotNull
48  @Override
49  public Map<String, String> getModifiedFields(@NotNull final TestGameObject gameObject) {
50  final Map<String, String> fields = new LinkedHashMap<>();
51  addModifiedFields(gameObject, fields);
52  return fields;
53  }
54 
55 }
void addModifiedFields( @NotNull final G gameObject, @NotNull final Map< String, String > fields)
A MapArchObject implementation for testing purposes.
final ArchetypeSet< G, A, R > archetypeSet
The ArchetypeSet for looking up archetypes.
Base package of all Gridarta classes.
Abstract factory for creating GameObject instances.
GameObjects are the objects based on Archetypes found on maps.
TestGameObjectParser(@NotNull final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype > gameObjectFactory, @NotNull final ArchetypeSet< TestGameObject, TestMapArchObject, TestArchetype > archetypeSet)
Create a new instance.
An Archetype implementation for testing purposes.
A GameObject implementation for testing purposes.
Interface that captures similarities between different ArchetypeSet implementations.
final GameObjectFactory< G, A, R > gameObjectFactory
The game object factory for creating new game object instances.
Abstract base class for classes implementing GameObjectParsers.
A GameObjectParser for regression tests.
Map< String, String > getModifiedFields(@NotNull final TestGameObject gameObject)