1. /*
  2. * @(#)UnsupportedOperationException.java 1.19 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang;
  8. /**
  9. * Thrown to indicate that the requested operation is not supported.<p>
  10. *
  11. * This class is a member of the
  12. * <a href="{@docRoot}/../guide/collections/index.html">
  13. * Java Collections Framework</a>.
  14. *
  15. * @author Josh Bloch
  16. * @version 1.19, 12/19/03
  17. * @since 1.2
  18. */
  19. public class UnsupportedOperationException extends RuntimeException {
  20. /**
  21. * Constructs an UnsupportedOperationException with no detail message.
  22. */
  23. public UnsupportedOperationException() {
  24. }
  25. /**
  26. * Constructs an UnsupportedOperationException with the specified
  27. * detail message.
  28. *
  29. * @param message the detail message
  30. */
  31. public UnsupportedOperationException(String message) {
  32. super(message);
  33. }
  34. /**
  35. * Constructs a new exception with the specified detail message and
  36. * cause.
  37. *
  38. * <p>Note that the detail message associated with <code>cause</code> is
  39. * <i>not</i> automatically incorporated in this exception's detail
  40. * message.
  41. *
  42. * @param message the detail message (which is saved for later retrieval
  43. * by the {@link Throwable#getMessage()} method).
  44. * @param cause the cause (which is saved for later retrieval by the
  45. * {@link Throwable#getCause()} method). (A <tt>null</tt> value
  46. * is permitted, and indicates that the cause is nonexistent or
  47. * unknown.)
  48. * @since 1.5
  49. */
  50. public UnsupportedOperationException(String message, Throwable cause) {
  51. super(message, cause);
  52. }
  53. /**
  54. * Constructs a new exception with the specified cause and a detail
  55. * message of <tt>(cause==null ? null : cause.toString())</tt> (which
  56. * typically contains the class and detail message of <tt>cause</tt>).
  57. * This constructor is useful for exceptions that are little more than
  58. * wrappers for other throwables (for example, {@link
  59. * java.security.PrivilegedActionException}).
  60. *
  61. * @param cause the cause (which is saved for later retrieval by the
  62. * {@link Throwable#getCause()} method). (A <tt>null</tt> value is
  63. * permitted, and indicates that the cause is nonexistent or
  64. * unknown.)
  65. * @since 1.5
  66. */
  67. public UnsupportedOperationException(Throwable cause) {
  68. super(cause);
  69. }
  70. static final long serialVersionUID = -1242599979055084673L;
  71. }