Remove extra lines.

This commit is contained in:
aherbert 2020-02-17 13:24:03 +00:00
parent 5f70948570
commit b377f59613
21 changed files with 0 additions and 66 deletions

View File

@ -81,7 +81,6 @@ public class DynamicHasher implements Hasher {
public final Builder with(final String property) {
return with(property.getBytes(StandardCharsets.UTF_8));
}
}
/**

View File

@ -52,7 +52,6 @@ public interface HashFunctionIdentity {
* HashFunctionIdentity name, signedness, and process.
*/
Comparator<HashFunctionIdentity> COMMON_COMPARATOR = new Comparator<HashFunctionIdentity>() {
@Override
public int compare(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
int result = identity1.getName().compareToIgnoreCase(identity2.getName());
@ -71,7 +70,6 @@ public interface HashFunctionIdentity {
* HashFunctionIdentity name, signedness, process, and privider..
*/
Comparator<HashFunctionIdentity> DEEP_COMPARATOR = new Comparator<HashFunctionIdentity>() {
@Override
public int compare(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
int result = COMMON_COMPARATOR.compare(identity1, identity2);
@ -109,7 +107,6 @@ public interface HashFunctionIdentity {
return String.format("%s-%s-%s",
identity.getName().toUpperCase(Locale.ROOT), identity.getSignedness(),
identity.getProcessType() ).getBytes(StandardCharsets.UTF_8);
}
/**

View File

@ -74,7 +74,6 @@ public interface Hasher {
* @see #getBits(Shape)
*/
Builder with(String property);
}
/**

View File

@ -167,7 +167,6 @@ public class Shape {
this.hashCode = generateHashCode();
// check that probability is within range
getProbability();
}
/**
@ -193,7 +192,6 @@ public class Shape {
this.hashCode = generateHashCode();
// check that probability is within range
getProbability();
}
/**
@ -224,7 +222,6 @@ public class Shape {
this.hashCode = generateHashCode();
// check that probability is within range
getProbability();
}
/**

View File

@ -365,7 +365,6 @@ public abstract class AbstractBloomFilterTest {
hasher2 = new StaticHasher(values.iterator(), shape);
filter = createFilter(hasher2, shape);
assertFalse(filter.isFull());
}
/**
@ -519,5 +518,4 @@ public abstract class AbstractBloomFilterTest {
assertEquals(20, bf.xorCardinality(bf2));
assertEquals(20, bf2.xorCardinality(bf));
}
}

View File

@ -57,7 +57,6 @@ public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
bf2 = createFilter(hasher2, shape);
assertEquals(0, bf.andCardinality(bf2));
assertEquals(0, bf2.andCardinality(bf));
}
@Override
@ -88,7 +87,6 @@ public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
bf.merge(bf2);
assertEquals(27, bf.cardinality());
}
/**
@ -116,7 +114,5 @@ public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
bf2 = createFilter(hasher2, shape);
assertEquals(15, bf.xorCardinality(bf2));
assertEquals(15, bf2.xorCardinality(bf));
}
}

View File

@ -37,7 +37,6 @@ import org.junit.Test;
*/
public class CountingBloomFilterTest extends AbstractBloomFilterTest {
/**
* Tests that the andCardinality calculation executes correctly when using a
* CountingBloomFilter argument.
@ -64,8 +63,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
bf2 = createFilter(hasher2, shape);
assertEquals(0, bf.andCardinality(bf2));
assertEquals(0, bf2.andCardinality(bf));
}
/**
@ -81,7 +78,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
assertEquals(0x1FFFF, lb[0]);
assertEquals(1, lb.length);
assertEquals(17, bf.getCounts().count());
assertEquals(Integer.valueOf(1), bf.getCounts().map(Map.Entry::getValue).max(Integer::compare).get());
assertEquals(Integer.valueOf(1), bf.getCounts().map(Map.Entry::getValue).min(Integer::compare).get());
@ -129,7 +125,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
{
// expected
}
}
@Override
@ -142,7 +137,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
return new CountingBloomFilter(hasher, shape);
}
/**
* Tests that merge correctly updates the counts when a CountingBloomFilter is passed
*/
@ -219,7 +213,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
}
}
}
/**
@ -233,7 +226,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
CountingBloomFilter bf = createFilter(hasher, shape);
final Map<Integer,Integer> map = new HashMap<>();
bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
map.put(1, Integer.MAX_VALUE);
@ -328,7 +320,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
assertNotNull(map2.get(i));
assertEquals(1, map2.get(i).intValue());
}
}
/**
@ -352,7 +343,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
final Hasher hasher = new StaticHasher(lst.iterator(), shape);
bf.remove(hasher);
assertEquals(17, bf.cardinality());
final Map<Integer,Integer> map2 = new HashMap<>();
@ -363,7 +353,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
assertNotNull(map2.get(i));
assertEquals(1, map2.get(i).intValue());
}
}
/**
@ -398,7 +387,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
assertNotNull(map2.get(i));
assertEquals(1, map2.get(i).intValue());
}
}
/**
@ -412,7 +400,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
CountingBloomFilter bf = createFilter(hasher, shape);
final Map<Integer,Integer> map = new HashMap<>();
bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
map.remove(1);
@ -435,5 +422,4 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
// do nothing
}
}
}

View File

@ -84,7 +84,6 @@ public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
verifyHasher(hasher);
hasher.getBits(getShape()).forEachRemaining((IntConsumer) bitSet::set);
}
}
@Override
@ -96,5 +95,4 @@ public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
protected AbstractBloomFilter createFilter(final Hasher hasher, final Shape shape) {
return new BF(hasher, shape);
}
}

View File

@ -57,5 +57,4 @@ public class HasherBloomFilterTest extends AbstractBloomFilterTest {
protected HasherBloomFilter createFilter(final Hasher hasher, final Shape shape) {
return new HasherBloomFilter(hasher, shape);
}
}

View File

@ -95,7 +95,6 @@ public class SetOperationsTest {
assertEquals(0.514928749927334, SetOperations.cosineDistance(filter1, filter2), 0.000000000000001);
assertEquals(0.514928749927334, SetOperations.cosineDistance(filter2, filter1), 0.000000000000001);
}
/**
@ -115,7 +114,6 @@ public class SetOperationsTest {
assertEquals(1.0, SetOperations.cosineDistance(filter2, filter1), 0.0001);
assertEquals(1.0, SetOperations.cosineDistance(filter1, filter3), 0.0001);
assertEquals(1.0, SetOperations.cosineDistance(filter3, filter1), 0.0001);
}
/**
@ -140,7 +138,6 @@ public class SetOperationsTest {
assertEquals(0.485071250072666, SetOperations.cosineSimilarity(filter1, filter2), 0.000000000000001);
assertEquals(0.485071250072666, SetOperations.cosineSimilarity(filter2, filter1), 0.000000000000001);
}
/**
@ -160,7 +157,6 @@ public class SetOperationsTest {
assertEquals(0.0, SetOperations.cosineSimilarity(filter2, filter1), 0.0001);
assertEquals(0.0, SetOperations.cosineSimilarity(filter1, filter3), 0.0001);
assertEquals(0.0, SetOperations.cosineSimilarity(filter3, filter1), 0.0001);
}
/**
@ -180,7 +176,6 @@ public class SetOperationsTest {
final long estimate = SetOperations.estimateIntersectionSize(filter1, filter2);
assertEquals(1, estimate);
}
/**
@ -207,10 +202,8 @@ public class SetOperationsTest {
final BloomFilter filter2 = new HasherBloomFilter(hasher2, shape);
assertEquals(3, SetOperations.estimateSize(filter2));
}
/**
* Tests that the union size estimate is correctly calculated.
*/
@ -228,7 +221,6 @@ public class SetOperationsTest {
final long estimate = SetOperations.estimateUnionSize(filter1, filter2);
assertEquals(3, estimate);
}
/**
@ -253,10 +245,8 @@ public class SetOperationsTest {
assertEquals(17, SetOperations.hammingDistance(filter1, filter2));
assertEquals(17, SetOperations.hammingDistance(filter2, filter1));
}
/**
* Tests that the Jaccard distance is correctly calculated.
*/
@ -279,7 +269,6 @@ public class SetOperationsTest {
assertEquals(0.32, SetOperations.jaccardDistance(filter1, filter2), 0.001);
assertEquals(0.32, SetOperations.jaccardDistance(filter2, filter1), 0.001);
}
/**
@ -299,7 +288,6 @@ public class SetOperationsTest {
assertEquals(1.0, SetOperations.jaccardDistance(filter2, filter1), 0.0001);
assertEquals(0.0, SetOperations.jaccardDistance(filter1, filter3), 0.0001);
assertEquals(0.0, SetOperations.jaccardDistance(filter3, filter1), 0.0001);
}
/**
@ -343,6 +331,5 @@ public class SetOperationsTest {
assertEquals(0.0, SetOperations.jaccardSimilarity(filter2, filter1), 0.0001);
assertEquals(1.0, SetOperations.jaccardSimilarity(filter1, filter3), 0.0001);
assertEquals(1.0, SetOperations.jaccardSimilarity(filter3, filter1), 0.0001);
}
}

View File

@ -54,7 +54,6 @@ public class CommonComparatorTest {
ProcessType.CYCLIC, 300L);
assertEquals(0, HashFunctionIdentity.COMMON_COMPARATOR.compare(impl1, impl2));
}
/**
@ -160,5 +159,4 @@ public class CommonComparatorTest {
assertEquals("Unexpected order for " + HashFunctionIdentity.asCommonString(id), idx++, id.getSignature());
}
}
}

View File

@ -54,7 +54,6 @@ public class DeepComparatorTest {
ProcessType.CYCLIC, 300L);
assertEquals(0, HashFunctionIdentity.DEEP_COMPARATOR.compare(impl1, impl2));
}
/**
@ -187,5 +186,4 @@ public class DeepComparatorTest {
idx++, id.getSignature());
}
}
}

View File

@ -66,7 +66,6 @@ public class DynamicHasherBuilderTest {
assertTrue(iter.hasNext());
assertEquals(expected, iter.nextInt());
assertFalse(iter.hasNext());
}
/**

View File

@ -93,7 +93,6 @@ public class DynamicHasherTest {
assertEquals(element, iter.nextInt());
}
assertFalse(iter.hasNext());
}
/**
@ -113,7 +112,6 @@ public class DynamicHasherTest {
assertEquals(element, iter.nextInt());
}
assertFalse(iter.hasNext());
}
/**
@ -140,5 +138,4 @@ public class DynamicHasherTest {
assertTrue(builder.build().isEmpty());
assertFalse(builder.with("Hello").build().isEmpty());
}
}

View File

@ -89,5 +89,4 @@ public class HashFunctionIdentityImplTest {
assertEquals(ProcessType.ITERATIVE, impl.getProcessType());
assertEquals(-2l, impl.getSignature());
}
}

View File

@ -182,7 +182,6 @@ public class ShapeTest {
assertEquals(4, filterConfig.getNumberOfHashFunctions());
assertEquals(5, filterConfig.getNumberOfItems());
assertEquals(0.102194782, filterConfig.getProbability(), 0.000001);
}
/**
@ -200,7 +199,6 @@ public class ShapeTest {
assertEquals(3, filterConfig.getNumberOfHashFunctions());
assertEquals(5, filterConfig.getNumberOfItems());
assertEquals(0.100375138, filterConfig.getProbability(), 0.000001);
}
/**
@ -260,7 +258,6 @@ public class ShapeTest {
assertEquals(3, shape.getNumberOfHashFunctions());
assertEquals(5, shape.getNumberOfItems());
assertEquals(0.100375138, shape.getProbability(), 0.000001);
}
/**
@ -448,7 +445,6 @@ public class ShapeTest {
};
assertNotEquals(new Shape(testFunction2, 4, 1.0 / 10), shape);
}
/**
@ -459,5 +455,4 @@ public class ShapeTest {
final int hashCode = Objects.hash(testFunction, 24, 3);
assertEquals(hashCode, shape.hashCode());
}
}

View File

@ -244,7 +244,6 @@ public class StaticHasherTest {
final StaticHasher hasher2 = new StaticHasher(hasher, shape);
assertEquals(shape, hasher2.getShape());
assertSameBits(hasher, hasher2);
}
/**
@ -280,7 +279,6 @@ public class StaticHasherTest {
assertEquals(i, iter.nextInt());
}
assertFalse(iter.hasNext());
}
/**
@ -317,7 +315,6 @@ public class StaticHasherTest {
} catch (final IllegalArgumentException expected) {
// do nothing
}
}
/**
@ -328,7 +325,6 @@ public class StaticHasherTest {
final List<Integer> lst = new ArrayList<>();
StaticHasher hasher = new StaticHasher(lst.iterator(), shape);
assertTrue(hasher.isEmpty());
lst.add( Integer.valueOf(1));

View File

@ -60,5 +60,4 @@ public class MD5CyclicTest {
final long expected = md5.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, md5.getSignature());
}
}

View File

@ -62,5 +62,4 @@ public class Murmur128x86CyclicTest {
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, murmur.getSignature());
}
}

View File

@ -60,5 +60,4 @@ public class Murmur32x86IterativeTest {
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, murmur.getSignature());
}
}

View File

@ -65,5 +65,4 @@ public class ObjectsHashIterativeTest {
assertEquals(expected, expected2);
assertEquals(expected, obj.getSignature());
}
}