From c4de3dd2bb8afb3323fc3aaf394a463aa4222768 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Tue, 30 Apr 2013 14:14:40 +0000 Subject: [PATCH] Some Fields can be private git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477645 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections4/map/AbstractHashedMap.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java index 3824c223c..f51515679 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java @@ -75,6 +75,8 @@ public class AbstractHashedMap extends AbstractMap implements Iterab /** An object for masking null */ protected static final Object NULL = new Object(); + // TODO Privatise fields? + /** Load factor, normally 0.75 */ protected transient float loadFactor; /** The size of the map */ @@ -831,7 +833,7 @@ public class AbstractHashedMap extends AbstractMap implements Iterab */ protected static class EntrySet extends AbstractSet> { /** The parent map */ - protected final AbstractHashedMap parent; + private final AbstractHashedMap parent; protected EntrySet(final AbstractHashedMap parent) { super(); @@ -925,7 +927,7 @@ public class AbstractHashedMap extends AbstractMap implements Iterab */ protected static class KeySet extends AbstractSet { /** The parent map */ - protected final AbstractHashedMap parent; + private final AbstractHashedMap parent; protected KeySet(final AbstractHashedMap parent) { super(); @@ -1009,7 +1011,7 @@ public class AbstractHashedMap extends AbstractMap implements Iterab */ protected static class Values extends AbstractCollection { /** The parent map */ - protected final AbstractHashedMap parent; + private final AbstractHashedMap parent; protected Values(final AbstractHashedMap parent) { super(); @@ -1131,15 +1133,15 @@ public class AbstractHashedMap extends AbstractMap implements Iterab protected static abstract class HashIterator { /** The parent map */ - protected final AbstractHashedMap parent; + private final AbstractHashedMap parent; /** The current index into the array of buckets */ - protected int hashIndex; + private int hashIndex; /** The last returned entry */ - protected HashEntry last; + private HashEntry last; /** The next entry */ - protected HashEntry next; + private HashEntry next; /** The modification count expected */ - protected int expectedModCount; + private int expectedModCount; protected HashIterator(final AbstractHashedMap parent) { super();