Example usage for java.lang RuntimeException RuntimeException

List of usage examples for java.lang RuntimeException RuntimeException

Introduction

In this page you can find the example usage for java.lang RuntimeException RuntimeException.

Prototype

public RuntimeException(Throwable cause) 

Source Link

Document

Constructs a new runtime exception with the specified cause and a detail message of (cause==null ?

Usage

From source file:Main.java

public static int max(int[] values) {
    if (values == null)
        throw new RuntimeException("The maximum of null is not defined!");
    if (values.length == 0)
        throw new RuntimeException("The maximum of an empty list is not defined!");

    int max = values[0];
    for (int i = 1; i < values.length; i++)
        if (max < values[i])
            max = values[i];//from   w  ww.  ja va  2s  .  c o  m
    return max;
}

From source file:Main.java

public static java.lang.CharSequence stringOrSpannedString(java.lang.CharSequence source) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static float[] spatialSampling(android.gesture.Gesture gesture, int bitmapSize) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static java.lang.String calledPartyBCDToString(byte[] bytes, int offset, int length) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static final void appendValueToSql(java.lang.StringBuilder sql, java.lang.Object value) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static java.lang.String[] split(java.lang.String text, java.lang.String expression) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static void abortUnless(boolean condition, String msg) {
    if (!condition) {
        throw new RuntimeException(msg);
    }//w w  w  .  ja va 2s .  c o  m
}

From source file:Main.java

public static android.graphics.Bitmap createVideoThumbnail(java.lang.String filePath, int kind) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static java.lang.CharSequence getRelativeTimeSpanString(long startTime) {
    throw new RuntimeException("Stub!");
}

From source file:Main.java

public static void appendEscapedSQLString(java.lang.StringBuilder sb, java.lang.String sqlString) {
    throw new RuntimeException("Stub!");
}