Skip to content

Commit

Permalink
[COLLECTIONS-757] Update the JavaDoc of the BidiMap (#146)
Browse files Browse the repository at this point in the history
* [COLLECTIONS-757] Update the JavaDoc of the BidiMap

* Starts the Javadoc with "Makes..." instead of "make..."
  • Loading branch information
dota17 authored Apr 26, 2020
1 parent a53127e commit c1082d5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected AbstractDualBidiMap(final Map<K, V> normalMap, final Map<V, K> reverse
* @param normalMap the normal direction map
* @param reverseMap the reverse direction map
* @param inverseMap this map, which is the inverse in the new map
* @return the inverse map
* @return the bidi map
*/
protected abstract BidiMap<V, K> createBidiMap(Map<V, K> normalMap, Map<K, V> reverseMap, BidiMap<K, V> inverseMap);

Expand Down Expand Up @@ -219,12 +219,9 @@ public boolean containsValue(final Object value) {
//-----------------------------------------------------------------------
/**
* Obtains a {@code MapIterator} over the map.
* The iterator implements {@code ResetableMapIterator}.
* The iterator implements {@link BidiMapIterator}.
* This implementation relies on the entrySet iterator.
* <p>
* The setValue() methods only allow a new value to be set.
* If the value being set is already in the map, an IllegalArgumentException
* is thrown (as setValue cannot change the size of the map).
*
* @return a map iterator
*/
Expand Down Expand Up @@ -353,7 +350,7 @@ protected abstract static class View<K, V, E> extends AbstractCollectionDecorato
protected final AbstractDualBidiMap<K, V> parent;

/**
* Constructs a new view of the BidiMap.
* Constructor.
*
* @param coll the collection view being decorated
* @param parent the parent BidiMap
Expand Down Expand Up @@ -452,7 +449,7 @@ protected static class KeySet<K> extends View<K, Object, K> implements Set<K> {
private static final long serialVersionUID = -7107935777385040694L;

/**
* Constructs a new view of the BidiMap.
* Constructor.
*
* @param parent the parent BidiMap
*/
Expand Down Expand Up @@ -536,7 +533,7 @@ protected static class Values<V> extends View<Object, V, V> implements Set<V> {
private static final long serialVersionUID = 4023777119829639864L;

/**
* Constructs a new view of the BidiMap.
* Constructor.
*
* @param parent the parent BidiMap
*/
Expand Down Expand Up @@ -620,7 +617,7 @@ protected static class EntrySet<K, V> extends View<K, V, Map.Entry<K, V>> implem
private static final long serialVersionUID = 4040410962603292348L;

/**
* Constructs a new view of the BidiMap.
* Constructor.
*
* @param parent the parent BidiMap
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import org.apache.commons.collections4.BidiMap;

/**
* Implementation of {@code BidiMap} that uses two {@code LinkedHashMap} instances.
* Implementation of {@link BidiMap} that uses two {@link LinkedHashMap} instances.
* <p>
* Two {@code LinkedHashMap} instances are used in this class.
* Two {@link LinkedHashMap} instances are used in this class.
* This provides fast lookups at the expense of storing two sets of map entries and two linked lists.
* </p>
*
Expand All @@ -51,7 +51,7 @@ public DualLinkedHashBidiMap() {

/**
* Constructs a {@code LinkedHashBidiMap} and copies the mappings from
* specified {@code Map}.
* specified {@link Map}.
*
* @param map the map whose mappings are to be placed in this map
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* Implementation of {@link BidiMap} that uses two {@link TreeMap} instances.
* <p>
* The setValue() method on iterators will succeed only if the new value being set is
* not already in the bidimap.
* not already in the bidi map.
* </p>
* <p>
* When considering whether to use this class, the {@link TreeBidiMap} class should
Expand Down Expand Up @@ -69,7 +69,7 @@ public class DualTreeBidiMap<K, V> extends AbstractDualBidiMap<K, V>
private final Comparator<? super V> valueComparator;

/**
* Creates an empty {@code DualTreeBidiMap}
* Creates an empty {@link DualTreeBidiMap}.
*/
public DualTreeBidiMap() {
super(new TreeMap<K, V>(), new TreeMap<V, K>());
Expand All @@ -78,8 +78,8 @@ public DualTreeBidiMap() {
}

/**
* Constructs a {@code DualTreeBidiMap} and copies the mappings from
* specified {@code Map}.
* Constructs a {@link DualTreeBidiMap} and copies the mappings from
* specified {@link Map}.
*
* @param map the map whose mappings are to be placed in this map
*/
Expand Down
Loading

0 comments on commit c1082d5

Please sign in to comment.