Gridarta Editor
DuplicateFaceException.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.face;
21 
26 public class DuplicateFaceException extends Exception {
27 
31  private static final long serialVersionUID = 1L;
32 
37  private final FaceObject duplicate;
38 
43  private final FaceObject existing;
44 
50  public DuplicateFaceException(final FaceObject duplicate, final FaceObject existing) {
51  super("Non-unique face " + duplicate.getFaceName() + " from " + duplicate.getOriginalFilename());
52  this.duplicate = duplicate;
53  this.existing = existing;
54  }
55 
61  return duplicate;
62  }
63 
69  return existing;
70  }
71 
72 }
static final long serialVersionUID
The serial version UID.
DuplicateFaceException(final FaceObject duplicate, final FaceObject existing)
Creates a DuplicateFaceException.
Common interface for FaceObject.
Definition: FaceObject.java:30
FaceObject getExisting()
Returns the other duplicate that caused this exception.
final FaceObject existing
The other FaceObject causing the problem.
String getOriginalFilename()
Get the original filename of this face.
Exception that's thrown in case a face name was not unique.
final FaceObject duplicate
The FaceObject causing the problem.
String getFaceName()
Get the faceName, which is the name of the face as usable by the "face" attribute.
FaceObject getDuplicate()
Returns the duplicate that caused this exception.