Advertisement
PthariensFlame

InfiniteListException.java

Feb 4th, 2012
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.64 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement