public static boolean isOutOfBounds(int index, int length, int capacity) {
return (index | length | (index + length) | (capacity - (index + length))) < 0;
}
转载于:https://www.cnblogs.com/foxhasdream/p/8679163.html
public static boolean isOutOfBounds(int index, int length, int capacity) {
return (index | length | (index + length) | (capacity - (index + length))) < 0;
}
转载于:https://www.cnblogs.com/foxhasdream/p/8679163.html