Remove extra blank lines

This commit is contained in:
Gary Gregory 2023-11-26 13:51:55 -05:00
parent 1df5606b82
commit d0137526d1
74 changed files with 0 additions and 101 deletions

View File

@ -37,7 +37,6 @@ package org.apache.commons.collections4;
*/
final class ArrayUtils {
/**
* Don't allow instances.
*/

View File

@ -1795,7 +1795,6 @@ public class CollectionUtils {
return mergedList;
}
/**
* Returns a {@link Collection} of all the permutations of the input collection.
* <p>

View File

@ -63,7 +63,6 @@ public class ListUtils {
}
}
/**
* A helper class used to construct the longest common subsequence.
*/

View File

@ -42,7 +42,6 @@ public class QueueUtils {
*/
private QueueUtils() {}
/**
* Returns a synchronized (thread-safe) queue backed by the given queue.
* In order to guarantee serial access, it is critical that all access to the

View File

@ -198,7 +198,6 @@ public class SetUtils {
return set == null ? Collections.<T>emptySet() : set;
}
/**
* Gets a typed empty unmodifiable Set.
* @param <E> the element type

View File

@ -43,7 +43,6 @@ public class SplitMapUtils {
*/
private SplitMapUtils() {}
private static final class WrappedGet<K, V> implements IterableMap<K, V>, Unmodifiable {
private final Get<K, V> get;
@ -218,7 +217,6 @@ public class SplitMapUtils {
}
}
/**
* Gets the specified {@link Get} as an instance of {@link IterableMap}.
* If {@code get} implements {@link IterableMap} directly, no conversion will take place.

View File

@ -73,7 +73,6 @@ public abstract class AbstractBagDecorator<E>
return decorated().hashCode();
}
@Override
public int getCount(final Object object) {
return decorated().getCount(object);

View File

@ -62,7 +62,6 @@ public abstract class AbstractSortedBagDecorator<E>
return (SortedBag<E>) super.decorated();
}
@Override
public E first() {
return decorated().first();

View File

@ -101,7 +101,6 @@ public class PredicatedBag<E> extends PredicatedCollection<E> implements Bag<E>
return decorated().hashCode();
}
@Override
public boolean add(final E object, final int count) {
validate(object);

View File

@ -89,7 +89,6 @@ public class PredicatedSortedBag<E> extends PredicatedBag<E> implements SortedBa
return (SortedBag<E>) super.decorated();
}
@Override
public E first() {
return decorated().first();

View File

@ -100,7 +100,6 @@ public class SynchronizedBag<E> extends SynchronizedCollection<E> implements Bag
}
}
@Override
public boolean add(final E object, final int count) {
synchronized (lock) {

View File

@ -83,7 +83,6 @@ public class SynchronizedSortedBag<E> extends SynchronizedBag<E> implements Sort
return (SortedBag<E>) decorated();
}
@Override
public synchronized E first() {
synchronized (lock) {

View File

@ -121,7 +121,6 @@ public class TransformedBag<E> extends TransformedCollection<E> implements Bag<E
return decorated().hashCode();
}
@Override
public int getCount(final Object object) {
return getBag().getCount(object);
@ -132,7 +131,6 @@ public class TransformedBag<E> extends TransformedCollection<E> implements Bag<E
return getBag().remove(object, nCopies);
}
@Override
public boolean add(final E object, final int nCopies) {
return getBag().add(transform(object), nCopies);

View File

@ -112,7 +112,6 @@ public class TransformedSortedBag<E> extends TransformedBag<E> implements Sorted
return (SortedBag<E>) decorated();
}
@Override
public E first() {
return getSortedBag().first();

View File

@ -95,7 +95,6 @@ public class TreeBag<E> extends AbstractMapBag<E> implements SortedBag<E>, Seria
return super.add(object);
}
@Override
public E first() {
return getMap().firstKey();

View File

@ -130,7 +130,6 @@ public class DualTreeBidiMap<K, V> extends AbstractDualBidiMap<K, V>
return new DualTreeBidiMap<>(normalMap, reverseMap, inverseMap);
}
@Override
public Comparator<? super K> comparator() {
return ((SortedMap<K, V>) normalMap).comparator();
@ -205,7 +204,6 @@ public class DualTreeBidiMap<K, V> extends AbstractDualBidiMap<K, V>
return inverseBidiMap();
}
@Override
public SortedMap<K, V> headMap(final K toKey) {
final SortedMap<K, V> sub = ((SortedMap<K, V>) normalMap).headMap(toKey);

View File

@ -672,7 +672,6 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
return rval;
}
/**
* Compares two objects.
*

View File

@ -103,7 +103,6 @@ public abstract class AbstractCollectionDecorator<E>
this.collection = coll;
}
@Override
public boolean add(final E object) {
return decorated().add(object);

View File

@ -257,7 +257,6 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
return changed;
}
/**
* Provides checking for adding the index.
*

View File

@ -96,7 +96,6 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
return collection;
}
@Override
public boolean add(final E object) {
synchronized (lock) {

View File

@ -52,7 +52,6 @@ public class AbstractListIteratorDecorator<E> implements ListIterator<E> {
return iterator;
}
/** {@inheritDoc} */
@Override
public boolean hasNext() {

View File

@ -53,7 +53,6 @@ public class AbstractMapIteratorDecorator<K, V> implements MapIterator<K, V> {
return iterator;
}
/** {@inheritDoc} */
@Override
public boolean hasNext() {

View File

@ -53,7 +53,6 @@ public class AbstractOrderedMapIteratorDecorator<K, V> implements OrderedMapIter
return iterator;
}
/** {@inheritDoc} */
@Override
public boolean hasNext() {

View File

@ -49,7 +49,6 @@ public class BoundedIterator<E> implements Iterator<E> {
/** The position of the current element */
private long pos;
/**
* Decorates the specified iterator to return at most the given number of elements,
* skipping all elements until the iterator reaches the position at {@code offset}.
@ -88,7 +87,6 @@ public class BoundedIterator<E> implements Iterator<E> {
}
}
@Override
public boolean hasNext() {
if (!checkBounds()) {

View File

@ -27,7 +27,6 @@ import java.util.Objects;
import org.apache.commons.collections4.list.UnmodifiableList;
/**
* Provides an ordered iteration over the elements contained in a collection of
* ordered Iterators.

View File

@ -63,7 +63,6 @@ public abstract class LazyIteratorChain<E> implements Iterator<E> {
*/
private Iterator<? extends E> lastUsedIterator;
/**
* Gets the next iterator after the previous one has been exhausted.
* <p>
@ -100,7 +99,6 @@ public abstract class LazyIteratorChain<E> implements Iterator<E> {
}
}
/**
* Return true if any Iterator in the chain has a remaining element.
*

View File

@ -64,7 +64,6 @@ public class PeekingIterator<E> implements Iterator<E> {
return new PeekingIterator<>(iterator);
}
/**
* Constructor.
*

View File

@ -61,7 +61,6 @@ public class PushbackIterator<E> implements Iterator<E> {
return new PushbackIterator<>(iterator);
}
/**
* Constructor.
*

View File

@ -37,7 +37,6 @@ public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
/** The position of the current element */
private long pos;
/**
* Decorates the specified iterator to skip all elements until the iterator
* reaches the position at {@code offset}.
@ -71,7 +70,6 @@ public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
}
}
@Override
public E next() {
final E next = super.next();

View File

@ -53,7 +53,6 @@ public abstract class AbstractMapEntryDecorator<K, V> implements Map.Entry<K, V>
return entry;
}
@Override
public K getKey() {
return entry.getKey();

View File

@ -131,7 +131,6 @@ public class MultiKey<K> implements Serializable {
this(newArray(key1, key2), false);
}
/**
* Constructor taking three keys.
* <p>

View File

@ -99,7 +99,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
header = createHeaderNode();
}
@Override
public int size() {
return size;
@ -116,7 +115,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
return node.getValue();
}
@Override
public Iterator<E> iterator() {
return listIterator();
@ -132,7 +130,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
return new LinkedListIterator<>(this, fromIndex);
}
@Override
public int indexOf(final Object value) {
int i = 0;
@ -172,7 +169,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
return true;
}
@Override
public Object[] toArray() {
return toArray(new Object[size]);
@ -210,7 +206,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
return new LinkedSubList<>(this, fromIndexInclusive, toIndexExclusive);
}
@Override
public boolean add(final E value) {
addLast(value);
@ -237,7 +232,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
return true;
}
@Override
public E remove(final int index) {
final Node<E> node = getNode(index, false);
@ -279,7 +273,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
return modified;
}
/**
* {@inheritDoc}
* <p>
@ -315,7 +308,6 @@ public abstract class AbstractLinkedList<E> implements List<E> {
removeAllNodes();
}
public E getFirst() {
final Node<E> node = header.next;
if (node == header) {

View File

@ -74,7 +74,6 @@ public abstract class AbstractListDecorator<E> extends AbstractCollectionDecorat
return decorated().hashCode();
}
@Override
public void add(final int index, final E object) {
decorated().add(index, object);

View File

@ -105,7 +105,6 @@ public class PredicatedList<E> extends PredicatedCollection<E> implements List<E
return decorated().hashCode();
}
@Override
public E get(final int index) {
return decorated().get(index);
@ -126,7 +125,6 @@ public class PredicatedList<E> extends PredicatedCollection<E> implements List<E
return decorated().remove(index);
}
@Override
public void add(final int index, final E object) {
validate(object);

View File

@ -124,7 +124,6 @@ public class TransformedList<E> extends TransformedCollection<E> implements List
return decorated().hashCode();
}
@Override
public E get(final int index) {
return getList().get(index);
@ -145,7 +144,6 @@ public class TransformedList<E> extends TransformedCollection<E> implements List
return getList().remove(index);
}
@Override
public void add(final int index, E object) {
object = transform(object);

View File

@ -255,7 +255,6 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
return entry.getValue();
}
/**
* Puts a key-value mapping into this map.
* Neither the key nor the value may be null.

View File

@ -657,7 +657,6 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
}
private final class Values extends AbstractCollection<V> {
@Override

View File

@ -72,7 +72,6 @@ public abstract class AbstractMultiSetDecorator<E>
return decorated().hashCode();
}
@Override
public int getCount(final Object object) {
return decorated().getCount(object);

View File

@ -101,7 +101,6 @@ public class PredicatedMultiSet<E> extends PredicatedCollection<E> implements Mu
return decorated().hashCode();
}
@Override
public int add(final E object, final int count) {
validate(object);

View File

@ -97,7 +97,6 @@ public class SynchronizedMultiSet<E> extends SynchronizedCollection<E> implement
}
}
@Override
public int add(final E object, final int count) {
synchronized (lock) {

View File

@ -68,7 +68,6 @@ public abstract class AbstractQueueDecorator<E> extends AbstractCollectionDecora
return (Queue<E>) super.decorated();
}
@Override
public boolean offer(final E obj) {
return decorated().offer(obj);

View File

@ -272,7 +272,6 @@ public class CircularFifoQueue<E> extends AbstractCollection<E>
return elements[idx];
}
/**
* Adds the given element to this queue. If the queue is full, the least recently added
* element is discarded so that a new element can be inserted.

View File

@ -85,7 +85,6 @@ public class PredicatedQueue<E> extends PredicatedCollection<E> implements Queue
return (Queue<E>) super.decorated();
}
/**
* Override to validate the object being added to ensure it matches
* the predicate.

View File

@ -109,7 +109,6 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
return (Queue<E>) decorated();
}
@Override
public boolean offer(final E obj) {
return getQueue().offer(transform(obj));

View File

@ -140,7 +140,6 @@ public final class UnmodifiableQueue<E>
throw new UnsupportedOperationException();
}
@Override
public boolean offer(final E obj) {
throw new UnsupportedOperationException();

View File

@ -237,7 +237,6 @@ public class SequencesComparator<T> {
throw new IllegalStateException("Internal Error");
}
/**
* Build an edit script.
*

View File

@ -61,7 +61,6 @@ public abstract class AbstractNavigableSetDecorator<E>
return (NavigableSet<E>) super.decorated();
}
@Override
public E lower(final E e) {
return decorated().lower(e);

View File

@ -90,7 +90,6 @@ public class PredicatedNavigableSet<E> extends PredicatedSortedSet<E> implements
return (NavigableSet<E>) super.decorated();
}
@Override
public E lower(final E e) {
return decorated().lower(e);

View File

@ -110,7 +110,6 @@ public class TransformedNavigableSet<E> extends TransformedSortedSet<E> implemen
return (NavigableSet<E>) super.decorated();
}
@Override
public E lower(final E e) {
return decorated().lower(e);

View File

@ -769,7 +769,6 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
}
}
@Override
public Comparator<? super K> comparator() {
return getKeyAnalyzer();
@ -1387,7 +1386,6 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
}
}
/**
* This is an entry set view of the {@link org.apache.commons.collections4.Trie} as returned by {@link Map#entrySet()}.
*/
@ -2418,7 +2416,6 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
}
}
/**
* Reads the content of the stream.
*/

View File

@ -74,7 +74,6 @@ public class UnmodifiableTrie<K, V> implements Trie<K, V>, Serializable, Unmodif
this.delegate = tmpTrie;
}
@Override
public Set<Entry<K, V>> entrySet() {
return Collections.unmodifiableSet(delegate.entrySet());

View File

@ -1016,7 +1016,6 @@ public class MapUtilsTest {
assertEquals(1.0, MapUtils.getDouble(in, "noKey", 1.0), 0);
assertEquals(1.0, MapUtils.getDouble(in, "noKey", key -> 1.0), 0);
final Map<String, String> inStr = new HashMap<>();
final char decimalSeparator = getDecimalSeparator();
inStr.put("str1", "2" + decimalSeparator + "0");
@ -1127,7 +1126,6 @@ public class MapUtilsTest {
assertEquals(val, MapUtils.getByte(in, "noKey", val), 0);
assertEquals(val, MapUtils.getByte(in, "noKey", key -> val), 0);
final Map<String, String> inStr = new HashMap<>();
inStr.put("str1", "100");

View File

@ -41,4 +41,3 @@ public class TrieUtilsTest {
}

View File

@ -99,7 +99,6 @@ public abstract class AbstractSortedBagTest<T> extends AbstractBagTest<T> {
return new TreeBag<>();
}
@Override
public void resetEmpty() {
this.setCollection(CollectionSortedBag.collectionSortedBag(makeObject()));
@ -149,6 +148,5 @@ public abstract class AbstractSortedBagTest<T> extends AbstractBagTest<T> {
return (SortedBag<T>) super.getCollection();
}
// TODO: Add the SortedBag tests!
}

View File

@ -46,7 +46,6 @@ public class CollectionBagTest<T> extends AbstractCollectionTest<T> {
super(CollectionBagTest.class.getSimpleName());
}
@Override
public Bag<T> makeObject() {
return CollectionBag.collectionBag(new HashBag<>());
@ -91,7 +90,6 @@ public class CollectionBagTest<T> extends AbstractCollectionTest<T> {
// writeExternalFormToDisk((java.io.Serializable) getCollection(), "src/test/resources/data/test/CollectionBag.fullCollection.version4.obj");
// }
/**
* Compares the current serialized form of the Bag
* against the canonical version in SCM.

View File

@ -46,7 +46,6 @@ public class CollectionSortedBagTest<T> extends AbstractCollectionTest<T> {
super(CollectionSortedBagTest.class.getSimpleName());
}
/**
* Overridden because SortedBags don't allow null elements (normally).
* @return false
@ -110,7 +109,6 @@ public class CollectionSortedBagTest<T> extends AbstractCollectionTest<T> {
return (T[]) elements;
}
@Override
public String getCompatibilityVersion() {
return "4";
@ -123,7 +121,6 @@ public class CollectionSortedBagTest<T> extends AbstractCollectionTest<T> {
// writeExternalFormToDisk((java.io.Serializable) getCollection(), "src/test/resources/data/test/CollectionSortedBag.fullCollection.version4.obj");
// }
/**
* Compare the current serialized form of the Bag
* against the canonical version in SCM.

View File

@ -30,7 +30,6 @@ public class SynchronizedBagTest<T> extends AbstractBagTest<T> {
super(SynchronizedBagTest.class.getSimpleName());
}
@Override
public Bag<T> makeObject() {
return SynchronizedBag.synchronizedBag(new HashBag<>());

View File

@ -157,7 +157,6 @@ public class DualTreeBidiMap2Test<K extends Comparable<K>, V extends Comparable<
return new String[] { recursiveTest };
}
// public void testCreate() throws Exception {
// resetEmpty();
// writeExternalFormToDisk((java.io.Serializable) map, "src/test/resources/data/test/DualTreeBidiMap.emptyCollection.version4.Test2.obj");

View File

@ -48,7 +48,6 @@ public abstract class AbstractComparatorTest<T> extends AbstractObjectTest {
super(testName);
}
/**
* Implement this method to return a list of sorted objects.
*
@ -204,7 +203,6 @@ public abstract class AbstractComparatorTest<T> extends AbstractObjectTest {
}
}
// make sure the canonical form produces the ordering we currently
// expect
final List<T> randomList = getComparableObjectsOrdered();

View File

@ -124,7 +124,6 @@ public abstract class AbstractCompositePredicateTest<T> extends AbstractMockPred
assertThrows(NullPointerException.class, () -> getPredicateInstance(new Predicate[] { null, null }));
}
/**
* Tests {@code getInstance} with a null predicate collection
*/

View File

@ -24,7 +24,6 @@ import org.apache.commons.collections4.Predicate;
import org.apache.commons.collections4.functors.ComparatorPredicate.Criterion;
import org.junit.jupiter.api.Test;
public class ComparatorPredicateTest extends AbstractPredicateTest {
private static final class TestComparator<T extends Comparable<T>> implements Comparator<T> {
@Override

View File

@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertSame;
import org.apache.commons.collections4.Predicate;
import org.junit.jupiter.api.Test;
public class EqualPredicateTest extends AbstractPredicateTest {
private static final EqualsTestObject FALSE_OBJECT = new EqualsTestObject(false);
private static final EqualsTestObject TRUE_OBJECT = new EqualsTestObject(true);

View File

@ -55,7 +55,6 @@ public class NodeListIteratorTest extends AbstractIteratorTest<Node> {
// Default: use standard constr.
createIteratorWithStandardConstr = true;
// create mocked Node Instances and fill Node[] to be used by test cases
final Node node1 = createMock(Element.class);
final Node node2 = createMock(Element.class);

View File

@ -53,7 +53,6 @@ public class PermutationIteratorTest extends AbstractIteratorTest<List<Character
testList.addAll(Arrays.asList(testArray));
}
@Override
public boolean supportsRemove() {
return false;

View File

@ -829,7 +829,6 @@ public abstract class AbstractListTest<E> extends AbstractCollectionTest<E> {
"Exhausted iterator should raise NoSuchElement");
}
/**
* Tests the {@link ListIterator#add(Object)} method of the list
* iterator.

View File

@ -681,7 +681,6 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
verify();
}
/**
* Tests Map.equals(Object)
*/
@ -1750,7 +1749,6 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
}
}
/**
* Bulk test {@link Map#keySet()}. This method runs through all of
* the tests in {@link AbstractSetTest}.
@ -1942,7 +1940,6 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
// the value equal to the value returned from the values iterator.
}
/**
* Resets the {@link #map}, {@link #entrySet}, {@link #keySet},
* {@link #values} and {@link #confirmed} fields to empty.

View File

@ -83,7 +83,6 @@ public class LazyMapTest<K, V> extends AbstractIterableMapTest<K, V> {
assertEquals(1, map.size());
}
@Override
public String getCompatibilityVersion() {
return "4";

View File

@ -65,7 +65,6 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
/** MultiValuedHashMap created by reset(). */
protected MultiValuedMap<K, V> confirmed;
public AbstractMultiValuedMapTest(final String testName) {
super(testName);
}

View File

@ -110,7 +110,6 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
return multiset;
}
@Override
public void resetEmpty() {
this.setCollection(makeObject());
@ -615,7 +614,6 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
assertEquals(total, multiset2.hashCode());
}
/**
* Bulk test {@link MultiSet#uniqueSet()}. This method runs through all of
* the tests in {@link AbstractSetTest}.
@ -698,7 +696,6 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
}
}
/**
* Compare the current serialized form of the MultiSet
* against the canonical version in SCM.

View File

@ -116,7 +116,6 @@ public class UnmodifiableQueueTest<E> extends AbstractQueueTest<E> {
assertThrows(UnsupportedOperationException.class, () -> queue.poll());
}
@Override
public String getCompatibilityVersion() {
return "4";

View File

@ -69,7 +69,6 @@ public abstract class AbstractNavigableSetTest<E> extends AbstractSortedSetTest<
return new TreeSet<>();
}
/**
* Verification extension, will check the order of elements,
* the sets should already be verified equal.

View File

@ -124,7 +124,6 @@ public class UnmodifiableNavigableSetTest<E> extends AbstractNavigableSetTest<E>
assertNull(c, "natural order, so comparator should be null");
}
@Override
public String getCompatibilityVersion() {
return "4.1";

View File

@ -121,7 +121,6 @@ public class UnmodifiableSortedSetTest<E> extends AbstractSortedSetTest<E> {
assertNull(c, "natural order, so comparator should be null");
}
@Override
public String getCompatibilityVersion() {
return "4";

View File

@ -40,7 +40,6 @@ public class PatriciaTrie2Test<V> extends AbstractOrderedMapTest<String, V> {
return false;
}
@Override
public String getCompatibilityVersion() {
return "4";