Class Exceptions


  • public class Exceptions
    extends java.lang.Object
    This class provides static methods for throwing exceptions. It is only provided as a utility class for the collection implementations and is not a part of the API.
    Version:
    1.0 21-08-2003 18:44
    • Constructor Detail

      • Exceptions

        public Exceptions()
    • Method Detail

      • indexOutOfBounds

        public static void indexOutOfBounds​(int index,
                                            int low,
                                            int high)
                                     throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • nullArgument

        public static void nullArgument​(java.lang.String name)
                                 throws java.lang.NullPointerException
        Throws:
        java.lang.NullPointerException
      • negativeArgument

        public static void negativeArgument​(java.lang.String name,
                                            java.lang.Object value)
                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • negativeOrZeroArgument

        public static void negativeOrZeroArgument​(java.lang.String name,
                                                  java.lang.Object value)
                                           throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • endOfIterator

        public static void endOfIterator()
                                  throws java.util.NoSuchElementException
        Throws:
        java.util.NoSuchElementException
      • startOfIterator

        public static void startOfIterator()
                                    throws java.util.NoSuchElementException
        Throws:
        java.util.NoSuchElementException
      • noElementToRemove

        public static void noElementToRemove()
                                      throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • noElementToGet

        public static void noElementToGet()
                                   throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • noElementToSet

        public static void noElementToSet()
                                   throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • noLastElement

        public static void noLastElement()
                                  throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • dequeNoFirst

        public static void dequeNoFirst()
                                 throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • dequeNoLast

        public static void dequeNoLast()
                                throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • dequeNoFirstToRemove

        public static void dequeNoFirstToRemove()
                                         throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • dequeNoLastToRemove

        public static void dequeNoLastToRemove()
                                        throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • nullElementNotAllowed

        public static void nullElementNotAllowed()
                                          throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • cannotAdapt

        public static void cannotAdapt​(java.lang.String name)
                                throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • unsupported

        public static void unsupported​(java.lang.String name)
                                throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • unmodifiable

        public static void unmodifiable​(java.lang.String name)
                                 throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • cloning

        public static void cloning()
                            throws java.lang.RuntimeException
        Throws:
        java.lang.RuntimeException
      • invalidRangeBounds

        public static void invalidRangeBounds​(java.lang.Object first,
                                              java.lang.Object last)
                                       throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • cannotMergeRanges

        public static void cannotMergeRanges​(java.lang.Object r1,
                                             java.lang.Object r2)
                                      throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setNoFirst

        public static void setNoFirst()
                               throws java.util.NoSuchElementException
        Throws:
        java.util.NoSuchElementException
      • setNoLast

        public static void setNoLast()
                              throws java.util.NoSuchElementException
        Throws:
        java.util.NoSuchElementException
      • invalidSetBounds

        public static void invalidSetBounds​(java.lang.Object low,
                                            java.lang.Object high)
                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • valueNotInSubRange

        public static void valueNotInSubRange​(java.lang.Object value)
                                       throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • invalidUpperBound

        public static void invalidUpperBound​(java.lang.Object value)
                                      throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • invalidLowerBound

        public static void invalidLowerBound​(java.lang.Object value)
                                      throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException