001/** 002 * Copyright (C) 2010-2015 The Roslin Institute <contact andy.law@roslin.ed.ac.uk> 003 * 004 * This file is part of JEnsembl: a Java API to Ensembl data sources developed by the 005 * Bioinformatics Group at The Roslin Institute, The Royal (Dick) School of 006 * Veterinary Studies, University of Edinburgh. 007 * 008 * Project hosted at: http://jensembl.sourceforge.net 009 * 010 * This is free software: you can redistribute it and/or modify 011 * it under the terms of the GNU General Public License (version 3) as published by 012 * the Free Software Foundation. 013 * 014 * This software is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * in this software distribution. If not, see: http://opensource.org/licenses/gpl-3.0.html 021 */ 022/* 023 * To change this template, choose Tools | Templates 024 * and open the template in the editor. 025 */ 026package uk.ac.roslin.ensembl.exception; 027 028import java.util.Collection; 029import java.util.HashSet; 030import uk.ac.roslin.ensembl.model.core.Species; 031 032/** 033 * 034 * @author tpaterso 035 */ 036public class NonUniqueException extends EnsemblException { 037 038 Collection allHits = new HashSet(); 039 /** 040 * Creates a new instance of <code>NonUniqueException</code> without detail message. 041 */ 042 public NonUniqueException() { 043 super(); 044 } 045 046 /** 047 * Constructs an instance of <code>NonUniqueException</code> with the specified detail message. 048 * @param msg the detail message. 049 */ 050 public NonUniqueException(String msg) { 051 super(msg); 052 } 053 054 public NonUniqueException(String message, Exception parentException) { 055 super(message, parentException); 056 } 057 058 public NonUniqueException(Exception parentException) { 059 super(parentException); 060 } 061 062 public NonUniqueException(String message, Collection all) { 063 super(message); 064 allHits = all; 065 } 066 067 public Collection getAllHits() { 068 return allHits; 069 } 070 071}