Skip to content

Commit 2102948

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Use private and final more in AbstractBiMap.
RELNOTES=n/a PiperOrigin-RevId: 792172203
1 parent f6b2e04 commit 2102948

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

android/guava/src/com/google/common/collect/AbstractBiMap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public Set<Entry<K, V>> entrySet() {
299299
return (result == null) ? entrySet = new EntrySet() : result;
300300
}
301301

302-
class BiMapEntry extends ForwardingMapEntry<K, V> {
302+
private final class BiMapEntry extends ForwardingMapEntry<K, V> {
303303
private final Entry<K, V> delegate;
304304

305305
BiMapEntry(Entry<K, V> delegate) {
@@ -432,7 +432,7 @@ public boolean retainAll(Collection<?> c) {
432432
}
433433

434434
/** The inverse of any other {@code AbstractBiMap} subclass. */
435-
static class Inverse<K extends @Nullable Object, V extends @Nullable Object>
435+
private static final class Inverse<K extends @Nullable Object, V extends @Nullable Object>
436436
extends AbstractBiMap<K, V> {
437437
Inverse(Map<K, V> backward, AbstractBiMap<V, K> forward) {
438438
super(backward, forward);

guava/src/com/google/common/collect/AbstractBiMap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public Set<Entry<K, V>> entrySet() {
323323
return (result == null) ? entrySet = new EntrySet() : result;
324324
}
325325

326-
class BiMapEntry extends ForwardingMapEntry<K, V> {
326+
private final class BiMapEntry extends ForwardingMapEntry<K, V> {
327327
private final Entry<K, V> delegate;
328328

329329
BiMapEntry(Entry<K, V> delegate) {
@@ -456,7 +456,7 @@ public boolean retainAll(Collection<?> c) {
456456
}
457457

458458
/** The inverse of any other {@code AbstractBiMap} subclass. */
459-
static class Inverse<K extends @Nullable Object, V extends @Nullable Object>
459+
private static final class Inverse<K extends @Nullable Object, V extends @Nullable Object>
460460
extends AbstractBiMap<K, V> {
461461
Inverse(Map<K, V> backward, AbstractBiMap<V, K> forward) {
462462
super(backward, forward);

0 commit comments

Comments
 (0)