private static String badElementIndex(int index, int size, String desc) {
        if (index < 0) {
            return format("%s (%s) must not be negative", new Object[]{desc, Integer.valueOf(index)});
        } else if (size < 0) {
            throw new IllegalArgumentException((new StringBuilder(26)).append("negative size: ").append(size).toString());
        } else {
            return format("%s (%s) must be less than size (%s)", new Object[]{desc, Integer.valueOf(index), Integer.valueOf(size)});
        }
    }
================================================
Created by JessYan on 26/09/2016 13:59
<a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
<a href="https://github.com/JessYanCoding">Follow me</a>
================================================
arms/src/main/java/com/jess/arms/utils/Preconditions.java