aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java
diff options
context:
space:
mode:
authorGary D. Gregory <ggregory@apache.org>2013-01-22 07:07:42 +0000
committerGary D. Gregory <ggregory@apache.org>2013-01-22 07:07:42 +0000
commit5bd622dab027ef37001a630a7c825c5b8c19d1db (patch)
tree21e5b8ba39962218e69b3c6f4936a7a0bd73f515 /src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java
parentadfcc014bd6fd24ae76425f203ae5cc1888ee33f (diff)
downloadapache-commons-lang-5bd622dab027ef37001a630a7c825c5b8c19d1db.tar.gz
Add final modifier to method parameters.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1436768 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java')
-rw-r--r--src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java b/src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java
index 0c0078c23..f12a41f07 100644
--- a/src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java
+++ b/src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java
@@ -48,7 +48,7 @@ public class HashSetvBitSetTest {
/**
* @return bitSet - HashSet
*/
- private long printTimes(int count) {
+ private long printTimes(final int count) {
long hashSet = timeHashSet(count);
long bitSet = timeBitSet(count);
// If percent is less than 100, then bitset is faster
@@ -56,7 +56,7 @@ public class HashSetvBitSetTest {
return bitSet - hashSet;
}
- private static long timeHashSet(int count) {
+ private static long timeHashSet(final int count) {
int [] result = new int[0];
long start = System.nanoTime();
for (int i = 0; i < LOOPS; i++) {
@@ -67,7 +67,7 @@ public class HashSetvBitSetTest {
return elapsed;
}
- private static long timeBitSet(int count) {
+ private static long timeBitSet(final int count) {
int [] result = new int[0];
long start = System.nanoTime();
for (int i = 0; i < LOOPS; i++) {
@@ -79,7 +79,7 @@ public class HashSetvBitSetTest {
}
@SuppressWarnings("boxing")
- private static int[] testHashSet(int count) {
+ private static int[] testHashSet(final int count) {
HashSet<Integer> toRemove = new HashSet<Integer>();
int found = 0;
for (int i = 0; i < count; i++) {
@@ -88,7 +88,7 @@ public class HashSetvBitSetTest {
return extractIndices(toRemove);
}
- private static int[] testBitSet(int count) {
+ private static int[] testBitSet(final int count) {
BitSet toRemove = new BitSet();
int found = 0;
for (int i = 0; i < count; i++) {
@@ -98,7 +98,7 @@ public class HashSetvBitSetTest {
}
- private static int[] extractIndices(HashSet<Integer> coll) {
+ private static int[] extractIndices(final HashSet<Integer> coll) {
int[] result = new int[coll.size()];
int i = 0;
for (Integer index : coll) {
@@ -107,7 +107,7 @@ public class HashSetvBitSetTest {
return result;
}
- private static int[] extractIndices(BitSet coll) {
+ private static int[] extractIndices(final BitSet coll) {
int[] result = new int[coll.cardinality()];
int i = 0;
int j=0;
@@ -135,7 +135,7 @@ public class HashSetvBitSetTest {
Assert.assertTrue(timeDiff <= 0);
}
- private long printTimes(int arraySize, int bitSetSize) {
+ private long printTimes(final int arraySize, final int bitSetSize) {
int[] array = new int[arraySize];
BitSet remove = new BitSet();
for (int i = 0; i < bitSetSize; i++) {
@@ -148,7 +148,7 @@ public class HashSetvBitSetTest {
return bitSet - extract;
}
- private long timeBitSetRemoveAll(int[] array, BitSet toRemove) {
+ private long timeBitSetRemoveAll(final int[] array, final BitSet toRemove) {
int[] output = new int[0];
long start = System.nanoTime();
for(int i = 0; i < LOOPS2; i++){
@@ -159,7 +159,7 @@ public class HashSetvBitSetTest {
return end - start;
}
- private long timeExtractRemoveAll(int[] array, BitSet toRemove) {
+ private long timeExtractRemoveAll(final int[] array, final BitSet toRemove) {
int[] output = new int[0];
long start = System.nanoTime();
for(int i = 0; i < LOOPS2; i++){