< prev index next >
src/java.base/share/classes/sun/text/CompactByteArray.java
Print this page
rev 58552 : [mq]: 8241727-Typos-empty-lines-in-javadoc-inconsistent-indents-etc
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -150,12 +150,12 @@
touchBlock(i >> BLOCKSHIFT, value);
}
}
/**
- *Compact the array.
- */
+ * Compact the array.
+ */
public void compact()
{
if (!isCompact) {
int limitCompacted = 0;
int iBlockStart = 0;
@@ -239,21 +239,23 @@
*/
private final boolean blockTouched(int i) {
return hashes[i] != 0;
}
- /** For internal use only. Do not modify the result, the behavior of
- * modified results are undefined.
- */
+ /**
+ * 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.
- */
+ /**
+ * For internal use only. Do not modify the result, the behavior of
+ * modified results are undefined.
+ */
public byte[] getStringArray()
{
return values;
}
@@ -295,26 +297,22 @@
}
/**
* Generates the hash code for the compact array object
*/
-
public int hashCode() {
int result = 0;
int increment = Math.min(3, values.length/16);
for (int i = 0; i < values.length; i+= increment) {
result = result * 37 + values[i];
}
return result;
}
- // --------------------------------------------------------------
- // package private
- // --------------------------------------------------------------
/**
- * Expanding takes the array back to a 65536 element array.
- */
+ * Expanding takes the array back to a 65536 element array.
+ */
private void expand()
{
int i;
if (isCompact) {
byte[] tempArray;
< prev index next >