Make package private class final

This commit is contained in:
Gary Gregory 2023-11-05 08:13:52 -05:00
parent aa4a148bf0
commit 07967afd4b
8 changed files with 17 additions and 17 deletions

View File

@ -35,7 +35,7 @@ package org.apache.commons.collections4;
*
* @since 4.2 (Copied from Apache Commons Lang.)
*/
class ArrayUtils {
final class ArrayUtils {
/**

View File

@ -133,7 +133,7 @@ public class SynchronizedBag<E> extends SynchronizedCollection<E> implements Bag
/**
* Synchronized Set for the Bag class.
*/
class SynchronizedBagSet extends SynchronizedCollection<E> implements Set<E> {
final class SynchronizedBagSet extends SynchronizedCollection<E> implements Set<E> {
/** Serialization version */
private static final long serialVersionUID = 2990565892366827855L;

View File

@ -1496,7 +1496,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
}
}
class KeyView extends AbstractView<K> {
final class KeyView extends AbstractView<K> {
/**
* Creates a new TreeBidiMap.KeyView.
@ -1523,7 +1523,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
}
class ValueView extends AbstractView<V> {
final class ValueView extends AbstractView<V> {
/**
* Creates a new TreeBidiMap.ValueView.
@ -1553,7 +1553,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* A view of this map.
*/
class EntryView extends AbstractView<Map.Entry<K, V>> {
final class EntryView extends AbstractView<Map.Entry<K, V>> {
EntryView() {
super(KEY);
@ -1594,7 +1594,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* A view of this map.
*/
class InverseEntryView extends AbstractView<Map.Entry<V, K>> {
final class InverseEntryView extends AbstractView<Map.Entry<V, K>> {
InverseEntryView() {
super(VALUE);
@ -1718,7 +1718,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* An iterator over the map.
*/
class ViewMapIterator extends AbstractViewIterator implements OrderedMapIterator<K, V> {
final class ViewMapIterator extends AbstractViewIterator implements OrderedMapIterator<K, V> {
/**
* Constructor.
@ -1764,7 +1764,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* An iterator over the map.
*/
class InverseViewMapIterator extends AbstractViewIterator implements OrderedMapIterator<V, K> {
final class InverseViewMapIterator extends AbstractViewIterator implements OrderedMapIterator<V, K> {
/**
* Creates a new TreeBidiMap.InverseViewMapIterator.
@ -1810,7 +1810,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* An iterator over the map entries.
*/
class ViewMapEntryIterator extends AbstractViewIterator implements OrderedIterator<Map.Entry<K, V>> {
final class ViewMapEntryIterator extends AbstractViewIterator implements OrderedIterator<Map.Entry<K, V>> {
/**
* Constructor.
@ -1833,7 +1833,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* An iterator over the inverse map entries.
*/
class InverseViewMapEntryIterator extends AbstractViewIterator implements OrderedIterator<Map.Entry<V, K>> {
final class InverseViewMapEntryIterator extends AbstractViewIterator implements OrderedIterator<Map.Entry<V, K>> {
/**
* Constructor.
@ -2083,7 +2083,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* The inverse map implementation.
*/
class Inverse implements OrderedBidiMap<V, K> {
final class Inverse implements OrderedBidiMap<V, K> {
/** Store the keySet once created. */
private Set<V> inverseKeySet;

View File

@ -28,7 +28,7 @@ import org.apache.commons.collections4.Transformer;
*
* @since 3.0
*/
class FunctorUtils {
final class FunctorUtils {
/**
* Restricted constructor.

View File

@ -828,7 +828,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
AbstractMultiValuedMap.this.clear();
}
class AsMapEntrySet extends AbstractSet<Map.Entry<K, Collection<V>>> {
final class AsMapEntrySet extends AbstractSet<Map.Entry<K, Collection<V>>> {
@Override
public Iterator<Map.Entry<K, Collection<V>>> iterator() {
@ -864,7 +864,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
/**
* EntrySet iterator for the asMap view.
*/
class AsMapEntrySetIterator extends AbstractIteratorDecorator<Map.Entry<K, Collection<V>>> {
final class AsMapEntrySetIterator extends AbstractIteratorDecorator<Map.Entry<K, Collection<V>>> {
AsMapEntrySetIterator(final Iterator<Map.Entry<K, Collection<V>>> iterator) {
super(iterator);

View File

@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test;
*/
public class SetUniqueListTest<E> extends AbstractListTest<E> {
class SetUniqueList307 extends SetUniqueList<E> {
final class SetUniqueList307 extends SetUniqueList<E> {
/**
* Generated serial version ID.
*/

View File

@ -24,7 +24,7 @@ import java.util.Map;
* the class has to be separate of TestCompositeMap, else the test
* class also has to be serialized.
*/
class EmptyMapMutator<K, V> implements CompositeMap.MapMutator<K, V> {
final class EmptyMapMutator<K, V> implements CompositeMap.MapMutator<K, V> {
/** Serialization version */
private static final long serialVersionUID = -2729718980002476794L;

View File

@ -25,7 +25,7 @@ import java.util.Set;
* the class has to be separate of CompositeSetTest, else the test
* class also has to be serialized.
*/
class EmptySetMutator<E> implements CompositeSet.SetMutator<E> {
final class EmptySetMutator<E> implements CompositeSet.SetMutator<E> {
/** Serialization version */
private static final long serialVersionUID = 5321193666420238910L;