Java Assert assertIndex(int index, String msg)

Here you can find the source of assertIndex(int index, String msg)

Description

Asserts if index is between 0 and 63.

License

Apache License

Parameter

Parameter Description
index The index.
msg The error message.

Declaration

public static void assertIndex(int index, String msg) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from  w  ww .j a v a2s  .c  o  m
     * Asserts if index is between 0 and 63.
     *
     * @param index The index.
     * @param msg The error message.
     */
    public static void assertIndex(int index, String msg) {
        if ((index < 0) || (index > 63))
            throw new AssertionError(msg);
    }
}

Related

  1. assertHexOrDecLongValue(String value)
  2. assertInBounds(final String param, final int value, final int min, final int max)
  3. assertInBounds(int[] coordinates)
  4. assertIndex(final int size, final int index)
  5. assertIndex(final String s, final int index)
  6. assertInputNotEmpty(final String input, final String message)
  7. assertInstance(final Object object, final Class c)
  8. assertInstance(Object object, Class c)
  9. assertInstanceOf(Object obj, Class classType)