package fmlist; import java.util.List; /** * Indicates that an operation not supported by infinite lists was called * on or with one. * * @author Alexander Altman */ public class InfiniteListException extends Exception { private static final long serialVersionUID = 1L; /** * the list for which this exception was raised */ public final List list; /** * Creates a new instance of * InfiniteListException with the given attached list but not * using a detail message. * * @param list the list for which the exception was raised */ public InfiniteListException(List list) { this.list = list; } /** * Constructs an instance of * InfiniteListException with the given attached list and using * the specified detail message. * * @param list the list for which the exception was raised * @param msg the detail message. */ public InfiniteListException(List list, String msg) { super(msg); this.list = list; } /** * Constructs an instance of * InfiniteListException with a null attached list and not * using a detail message */ public InfiniteListException() { this.list = null; } /** * Constructs an instance of * InfiniteListException with a null attached list but using * the specified detail message * * @param msg the detail message */ public InfiniteListException(String msg) { super(msg); this.list = null; } }