< prev index next >
src/java.base/share/classes/sun/text/CompactByteArray.java
Print this page
*** 91,102 ****
* Constructor for CompactByteArray.
* @param indexArray the indicies of the compact array.
* @param newValues the values of the compact array.
* @exception IllegalArgumentException If index is out of range.
*/
! public CompactByteArray(short indexArray[],
! byte newValues[])
{
int i;
if (indexArray.length != INDEXCOUNT)
throw new IllegalArgumentException("Index out of bounds!");
for (i = 0; i < INDEXCOUNT; ++i) {
--- 91,102 ----
* Constructor for CompactByteArray.
* @param indexArray the indicies of the compact array.
* @param newValues the values of the compact array.
* @exception IllegalArgumentException If index is out of range.
*/
! public CompactByteArray(short[] indexArray,
! byte[] newValues)
{
int i;
if (indexArray.length != INDEXCOUNT)
throw new IllegalArgumentException("Index out of bounds!");
for (i = 0; i < INDEXCOUNT; ++i) {
*** 242,260 ****
}
/** For internal use only. Do not modify the result, the behavior of
* modified results are undefined.
*/
! public short getIndexArray()[]
{
return indices;
}
/** For internal use only. Do not modify the result, the behavior of
* modified results are undefined.
*/
! public byte getStringArray()[]
{
return values;
}
/**
--- 242,260 ----
}
/** For internal use only. Do not modify the result, the behavior of
* modified results are undefined.
*/
! public short[] getIndexArray()
{
return indices;
}
/** For internal use only. Do not modify the result, the behavior of
* modified results are undefined.
*/
! public byte[] getStringArray()
{
return values;
}
/**
*** 344,352 ****
private static final int INDEXSHIFT =(16-BLOCKSHIFT);
private static final int INDEXCOUNT =(1<<INDEXSHIFT);
private static final int BLOCKMASK = BLOCKCOUNT - 1;
private byte[] values; // char -> short (char parameterized short)
! private short indices[];
private boolean isCompact;
private int[] hashes;
};
--- 344,352 ----
private static final int INDEXSHIFT =(16-BLOCKSHIFT);
private static final int INDEXCOUNT =(1<<INDEXSHIFT);
private static final int BLOCKMASK = BLOCKCOUNT - 1;
private byte[] values; // char -> short (char parameterized short)
! private short[] indices;
private boolean isCompact;
private int[] hashes;
};
< prev index next >