Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

InfiniteListException.java

By: PthariensFlame on Feb 4th, 2012  |  syntax: Java  |  size: 1.64 KB  |  hits: 91  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package fmlist;
  2.  
  3. import java.util.List;
  4.  
  5. /**
  6.  * Indicates that an operation not supported by infinite lists was called
  7.  * on or with one.
  8.  *
  9.  * @author Alexander Altman
  10.  */
  11. public class InfiniteListException extends Exception {
  12.  
  13.     private static final long serialVersionUID = 1L;
  14.     /**
  15.      * the list for which this exception was raised
  16.      */
  17.     public final List<?> list;
  18.  
  19.     /**
  20.      * Creates a new instance of
  21.      * <code>InfiniteListException</code> with the given attached list but not
  22.      * using a detail message.
  23.      *
  24.      * @param list the list for which the exception was raised
  25.      */
  26.     public InfiniteListException(List<?> list) {
  27.         this.list = list;
  28.     }
  29.  
  30.     /**
  31.      * Constructs an instance of
  32.      * <code>InfiniteListException</code> with the given attached list and using
  33.      * the specified detail message.
  34.      *
  35.      * @param list the list for which the exception was raised
  36.      * @param msg the detail message.
  37.      */
  38.     public InfiniteListException(List<?> list, String msg) {
  39.         super(msg);
  40.         this.list = list;
  41.     }
  42.  
  43.     /**
  44.      * Constructs an instance of
  45.      * <code>InfiniteListException</code> with a null attached list and not
  46.      * using a detail message
  47.      */
  48.     public InfiniteListException() {
  49.         this.list = null;
  50.     }
  51.  
  52.     /**
  53.      * Constructs an instance of
  54.      * <code>InfiniteListException</code> with a null attached list but using
  55.      * the specified detail message
  56.      *
  57.      * @param msg the detail message
  58.      */
  59.     public InfiniteListException(String msg) {
  60.         super(msg);
  61.         this.list = null;
  62.     }
  63. }