Better internal class name

This commit is contained in:
Gary Gregory 2023-08-18 10:56:22 -04:00
parent 488393e600
commit 265ca720b5
2 changed files with 32 additions and 32 deletions

View File

@ -1472,7 +1472,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* A view of this map. * A view of this map.
*/ */
abstract class View<E> extends AbstractSet<E> { abstract class AbstractView<E> extends AbstractSet<E> {
/** Whether to return KEY or VALUE order. */ /** Whether to return KEY or VALUE order. */
final DataElement orderType; final DataElement orderType;
@ -1481,7 +1481,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Constructor. * Constructor.
* @param orderType the KEY or VALUE int for the order * @param orderType the KEY or VALUE int for the order
*/ */
View(final DataElement orderType) { AbstractView(final DataElement orderType) {
this.orderType = orderType; this.orderType = orderType;
} }
@ -1496,7 +1496,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
} }
} }
class KeyView extends View<K> { class KeyView extends AbstractView<K> {
/** /**
* Creates a new TreeBidiMap.KeyView. * Creates a new TreeBidiMap.KeyView.
@ -1523,7 +1523,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
} }
class ValueView extends View<V> { class ValueView extends AbstractView<V> {
/** /**
* Creates a new TreeBidiMap.ValueView. * 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. * A view of this map.
*/ */
class EntryView extends View<Map.Entry<K, V>> { class EntryView extends AbstractView<Map.Entry<K, V>> {
EntryView() { EntryView() {
super(KEY); super(KEY);
@ -1594,7 +1594,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* A view of this map. * A view of this map.
*/ */
class InverseEntryView extends View<Map.Entry<V, K>> { class InverseEntryView extends AbstractView<Map.Entry<V, K>> {
InverseEntryView() { InverseEntryView() {
super(VALUE); super(VALUE);
@ -1635,7 +1635,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* An iterator over the map. * An iterator over the map.
*/ */
abstract class ViewIterator { abstract class AbstractViewIterator {
/** Whether to return KEY or VALUE order. */ /** Whether to return KEY or VALUE order. */
private final DataElement orderType; private final DataElement orderType;
@ -1652,7 +1652,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Constructor. * Constructor.
* @param orderType the KEY or VALUE int for the order * @param orderType the KEY or VALUE int for the order
*/ */
ViewIterator(final DataElement orderType) { AbstractViewIterator(final DataElement orderType) {
this.orderType = orderType; this.orderType = orderType;
expectedModifications = modifications; expectedModifications = modifications;
nextNode = leastNode(rootNode[orderType.ordinal()], orderType); nextNode = leastNode(rootNode[orderType.ordinal()], orderType);
@ -1718,7 +1718,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* An iterator over the map. * An iterator over the map.
*/ */
class ViewMapIterator extends ViewIterator implements OrderedMapIterator<K, V> { class ViewMapIterator extends AbstractViewIterator implements OrderedMapIterator<K, V> {
/** /**
* Constructor. * Constructor.
@ -1764,7 +1764,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* An iterator over the map. * An iterator over the map.
*/ */
class InverseViewMapIterator extends ViewIterator implements OrderedMapIterator<V, K> { class InverseViewMapIterator extends AbstractViewIterator implements OrderedMapIterator<V, K> {
/** /**
* Creates a new TreeBidiMap.InverseViewMapIterator. * 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. * An iterator over the map entries.
*/ */
class ViewMapEntryIterator extends ViewIterator implements OrderedIterator<Map.Entry<K, V>> { class ViewMapEntryIterator extends AbstractViewIterator implements OrderedIterator<Map.Entry<K, V>> {
/** /**
* Constructor. * Constructor.
@ -1833,7 +1833,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* An iterator over the inverse map entries. * An iterator over the inverse map entries.
*/ */
class InverseViewMapEntryIterator extends ViewIterator implements OrderedIterator<Map.Entry<V, K>> { class InverseViewMapEntryIterator extends AbstractViewIterator implements OrderedIterator<Map.Entry<V, K>> {
/** /**
* Constructor. * Constructor.

View File

@ -1434,7 +1434,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An {@link Iterator} that returns {@link Entry} Objects. * An {@link Iterator} that returns {@link Entry} Objects.
*/ */
private class EntryIterator extends TrieIterator<Map.Entry<K, V>> { private class EntryIterator extends AbstractTrieIterator<Map.Entry<K, V>> {
@Override @Override
public Map.Entry<K, V> next() { public Map.Entry<K, V> next() {
return nextEntry(); return nextEntry();
@ -1477,7 +1477,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An {@link Iterator} that returns Key Objects. * An {@link Iterator} that returns Key Objects.
*/ */
private class KeyIterator extends TrieIterator<K> { private class KeyIterator extends AbstractTrieIterator<K> {
@Override @Override
public K next() { public K next() {
return nextEntry().getKey(); return nextEntry().getKey();
@ -1525,7 +1525,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An {@link Iterator} that returns Value Objects. * An {@link Iterator} that returns Value Objects.
*/ */
private class ValueIterator extends TrieIterator<V> { private class ValueIterator extends AbstractTrieIterator<V> {
@Override @Override
public V next() { public V next() {
return nextEntry().getValue(); return nextEntry().getValue();
@ -1536,7 +1536,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An iterator for the entries. * An iterator for the entries.
*/ */
abstract class TrieIterator<E> implements Iterator<E> { abstract class AbstractTrieIterator<E> implements Iterator<E> {
/** For fast-fail. */ /** For fast-fail. */
protected int expectedModCount = AbstractPatriciaTrie.this.modCount; protected int expectedModCount = AbstractPatriciaTrie.this.modCount;
@ -1547,14 +1547,14 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* Starts iteration from the root. * Starts iteration from the root.
*/ */
protected TrieIterator() { protected AbstractTrieIterator() {
next = AbstractPatriciaTrie.this.nextEntry(null); next = AbstractPatriciaTrie.this.nextEntry(null);
} }
/** /**
* Starts iteration at the given entry. * Starts iteration at the given entry.
*/ */
protected TrieIterator(final TrieEntry<K, V> firstEntry) { protected AbstractTrieIterator(final TrieEntry<K, V> firstEntry) {
next = firstEntry; next = firstEntry;
} }
@ -1609,7 +1609,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An {@link OrderedMapIterator} for a {@link org.apache.commons.collections4.Trie}. * An {@link OrderedMapIterator} for a {@link org.apache.commons.collections4.Trie}.
*/ */
private class TrieMapIterator extends TrieIterator<K> implements OrderedMapIterator<K, V> { private class TrieMapIterator extends AbstractTrieIterator<K> implements OrderedMapIterator<K, V> {
protected TrieEntry<K, V> previous; // the previous node to return protected TrieEntry<K, V> previous; // the previous node to return
@ -1680,14 +1680,14 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* A range view of the {@link org.apache.commons.collections4.Trie}. * A range view of the {@link org.apache.commons.collections4.Trie}.
*/ */
private abstract class RangeMap extends AbstractMap<K, V> private abstract class AbstractRangeMap extends AbstractMap<K, V>
implements SortedMap<K, V> { implements SortedMap<K, V> {
/** The {@link #entrySet()} view. */ /** The {@link #entrySet()} view. */
private transient volatile Set<Map.Entry<K, V>> entrySet; private transient volatile Set<Map.Entry<K, V>> entrySet;
/** /**
* Creates and returns an {@link #entrySet()} view of the {@link RangeMap}. * Creates and returns an {@link #entrySet()} view of the {@link AbstractRangeMap}.
*/ */
protected abstract Set<Map.Entry<K, V>> createEntrySet(); protected abstract Set<Map.Entry<K, V>> createEntrySet();
@ -1809,7 +1809,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
} }
/** /**
* Returns true if the provided key is in the FROM range of the {@link RangeMap}. * Returns true if the provided key is in the FROM range of the {@link AbstractRangeMap}.
*/ */
protected boolean inFromRange(final K key, final boolean forceInclusive) { protected boolean inFromRange(final K key, final boolean forceInclusive) {
final K fromKey = getFromKey(); final K fromKey = getFromKey();
@ -1823,7 +1823,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
} }
/** /**
* Returns true if the provided key is in the TO range of the {@link RangeMap}. * Returns true if the provided key is in the TO range of the {@link AbstractRangeMap}.
*/ */
protected boolean inToRange(final K key, final boolean forceInclusive) { protected boolean inToRange(final K key, final boolean forceInclusive) {
final K toKey = getToKey(); final K toKey = getToKey();
@ -1837,16 +1837,16 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
} }
/** /**
* Creates and returns a sub-range view of the current {@link RangeMap}. * Creates and returns a sub-range view of the current {@link AbstractRangeMap}.
*/ */
protected abstract SortedMap<K, V> createRangeMap(K fromKey, boolean fromInclusive, protected abstract SortedMap<K, V> createRangeMap(K fromKey, boolean fromInclusive,
K toKey, boolean toInclusive); K toKey, boolean toInclusive);
} }
/** /**
* A {@link RangeMap} that deals with {@link Entry}s. * A {@link AbstractRangeMap} that deals with {@link Entry}s.
*/ */
private class RangeEntryMap extends RangeMap { private class RangeEntryMap extends AbstractRangeMap {
/** The key to start from, null if the beginning. */ /** The key to start from, null if the beginning. */
private final K fromKey; private final K fromKey;
@ -1961,11 +1961,11 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
} }
/** /**
* A {@link Set} view of a {@link RangeMap}. * A {@link Set} view of a {@link AbstractRangeMap}.
*/ */
private class RangeEntrySet extends AbstractSet<Map.Entry<K, V>> { private class RangeEntrySet extends AbstractSet<Map.Entry<K, V>> {
private final RangeMap delegate; private final AbstractRangeMap delegate;
private transient int size = -1; private transient int size = -1;
@ -1974,7 +1974,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* Creates a {@link RangeEntrySet}. * Creates a {@link RangeEntrySet}.
*/ */
RangeEntrySet(final RangeMap delegate) { RangeEntrySet(final AbstractRangeMap delegate) {
this.delegate = Objects.requireNonNull(delegate, "delegate"); this.delegate = Objects.requireNonNull(delegate, "delegate");
} }
@ -2058,7 +2058,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An {@link Iterator} for {@link RangeEntrySet}s. * An {@link Iterator} for {@link RangeEntrySet}s.
*/ */
private final class EntryIterator extends TrieIterator<Map.Entry<K, V>> { private final class EntryIterator extends AbstractTrieIterator<Map.Entry<K, V>> {
private final K excludedKey; private final K excludedKey;
@ -2088,7 +2088,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* A submap used for prefix views over the {@link org.apache.commons.collections4.Trie}. * A submap used for prefix views over the {@link org.apache.commons.collections4.Trie}.
*/ */
private class PrefixRangeMap extends RangeMap { private class PrefixRangeMap extends AbstractRangeMap {
private final K prefix; private final K prefix;
@ -2353,7 +2353,7 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
/** /**
* An {@link Iterator} for iterating over a prefix search. * An {@link Iterator} for iterating over a prefix search.
*/ */
private final class EntryIterator extends TrieIterator<Map.Entry<K, V>> { private final class EntryIterator extends AbstractTrieIterator<Map.Entry<K, V>> {
// values to reset the subtree if we remove it. // values to reset the subtree if we remove it.
private final K prefix; private final K prefix;