Gridarta Editor
MapSizeMismatchException.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.actions;
21 
22 import java.io.File;
23 import net.sf.gridarta.utils.Size2D;
24 import org.jetbrains.annotations.NotNull;
25 
30 public class MapSizeMismatchException extends Exception {
31 
35  private static final long serialVersionUID = 1L;
36 
41  @NotNull
42  private final File mapFile;
43 
48  @NotNull
49  private final Size2D mapSize;
50 
55  @NotNull
56  private final Size2D otherMapSize;
57 
64  public MapSizeMismatchException(@NotNull final File mapFile, @NotNull final Size2D mapSize, @NotNull final Size2D otherMapSize) {
65  this.mapFile = mapFile;
66  this.mapSize = mapSize;
67  this.otherMapSize = otherMapSize;
68  }
69 
74  @NotNull
75  public File getMapFile() {
76  return mapFile;
77  }
78 
83  @NotNull
84  public Size2D getMapSize() {
85  return mapSize;
86  }
87 
92  @NotNull
94  return otherMapSize;
95  }
96 
97 }
Size2D getMapSize()
Returns the size of the first map.
static final long serialVersionUID
The serial version UID.
final Size2D mapSize
The size of the first map.
Base package of all Gridarta classes.
Size2D getOtherMapSize()
Returns the size of the second map.
final File mapFile
The map File of the first map.
MapSizeMismatchException(@NotNull final File mapFile, @NotNull final Size2D mapSize, @NotNull final Size2D otherMapSize)
Creates a new instance.
File getMapFile()
Returns the map File of the first map.
Exception thrown if the size of a map file is unexpected.
final Size2D otherMapSize
The size of the second map.
The class Size2D represents a 2d rectangular area.
Definition: Size2D.java:30