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-2023 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 
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 }
net.sf.gridarta.model.face.FaceObject.getOriginalFilename
String getOriginalFilename()
Get the original filename of this face.
net.sf.gridarta.model.face.DuplicateFaceException.getDuplicate
FaceObject getDuplicate()
Returns the duplicate that caused this exception.
Definition: DuplicateFaceException.java:60
net.sf.gridarta.model.face.DuplicateFaceException.getExisting
FaceObject getExisting()
Returns the other duplicate that caused this exception.
Definition: DuplicateFaceException.java:68
net.sf.gridarta.model.face.DuplicateFaceException.duplicate
final FaceObject duplicate
The FaceObject causing the problem.
Definition: DuplicateFaceException.java:37
net.sf.gridarta.model.face.DuplicateFaceException.existing
final FaceObject existing
The other FaceObject causing the problem.
Definition: DuplicateFaceException.java:43
net.sf.gridarta.model.face.FaceObject
Common interface for FaceObject.
Definition: FaceObject.java:30
net.sf.gridarta.model.face.FaceObject.getFaceName
String getFaceName()
Get the faceName, which is the name of the face as usable by the "face" attribute.
net.sf.gridarta.model.face.DuplicateFaceException
Exception that's thrown in case a face name was not unique.
Definition: DuplicateFaceException.java:26
net.sf.gridarta.model.face.DuplicateFaceException.DuplicateFaceException
DuplicateFaceException(final FaceObject duplicate, final FaceObject existing)
Creates a DuplicateFaceException.
Definition: DuplicateFaceException.java:50
net.sf.gridarta.model.face.DuplicateFaceException.serialVersionUID
static final long serialVersionUID
The serial version UID.
Definition: DuplicateFaceException.java:31