/** * Creates a slice over the specified array. */ public static Slice wrappedShortArray(short... array) { return wrappedShortArray(array, 0, array.length); }
/** * Creates a slice over the specified array. */ public static Slice wrappedShortArray(short... array) { return wrappedShortArray(array, 0, array.length); }
assertEquals(wrappedShortArray(shortArray).getShort(0), shortArray[0]); assertEquals(wrappedShortArray(shortArray, 1, 4).getShort(0), shortArray[1]); assertEquals(wrappedShortArray(shortArray, 1, 4).length(), 4 * SIZE_OF_SHORT); assertEquals(wrappedShortArray(shortArray).getShort(5 * SIZE_OF_SHORT), shortArray[5]);
assertEquals(wrappedShortArray(shortArray).getShort(0), shortArray[0]); assertEquals(wrappedShortArray(shortArray, 1, 4).getShort(0), shortArray[1]); assertEquals(wrappedShortArray(shortArray, 1, 4).length(), 4 * SIZE_OF_SHORT); assertEquals(wrappedShortArray(shortArray).getShort(5 * SIZE_OF_SHORT), shortArray[5]);