Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
Use HTML 'em' tag instead of 'i' tag
  • Loading branch information
garydgregory committed Jul 21, 2024
1 parent 0177e75 commit 4a73b69
Show file tree
Hide file tree
Showing 27 changed files with 114 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* <p>
* The removal order of an {@code ArrayStack} is based on insertion
* order: The most recently added element is removed first. The iteration
* order is <i>not</i> the same as the removal order. The iterator returns
* order is <em>not</em> the same as the removal order. The iterator returns
* elements from the bottom up.
* </p>
* <p>
Expand Down
28 changes: 14 additions & 14 deletions src/main/java/org/apache/commons/collections4/Bag.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* calling {@link #uniqueSet()} would return {@code {a, b, c}}.
* </p>
* <p>
* <i>NOTE: This interface violates the {@link Collection} contract.</i>
* The behavior specified in many of these methods is <i>not</i> the same
* <em>NOTE: This interface violates the {@link Collection} contract.</em>
* The behavior specified in many of these methods is <em>not</em> the same
* as the behavior specified by {@code Collection}.
* The non-compliant methods are clearly marked with "(Violation)".
* Exercise caution when using a bag as a {@code Collection}.
Expand All @@ -47,7 +47,7 @@
public interface Bag<E> extends Collection<E> {

/**
* <i>(Violation)</i>
* <em>(Violation)</em>
* Adds one copy of the specified object to the Bag.
* <p>
* If the object is already in the {@link #uniqueSet()} then increment its
Expand Down Expand Up @@ -82,7 +82,7 @@ public interface Bag<E> extends Collection<E> {
boolean add(E object, int nCopies);

/**
* <i>(Violation)</i>
* <em>(Violation)</em>
* Returns {@code true} if the bag contains all elements in
* the given collection, respecting cardinality. That is, if the
* given collection {@code coll} contains {@code n} copies
Expand All @@ -91,7 +91,7 @@ public interface Bag<E> extends Collection<E> {
*
* <p>
* The {@link Collection#containsAll(Collection)} method specifies
* that cardinality should <i>not</i> be respected; this method should
* that cardinality should <em>not</em> be respected; this method should
* return true if the bag contains at least one of every object contained
* in the given collection.
* </p>
Expand Down Expand Up @@ -123,15 +123,15 @@ public interface Bag<E> extends Collection<E> {
Iterator<E> iterator();

/**
* <i>(Violation)</i>
* <em>(Violation)</em>
* Removes all occurrences of the given object from the bag.
* <p>
* This will also remove the object from the {@link #uniqueSet()}.
* </p>
* <p>
* According to the {@link Collection#remove(Object)} method,
* this method should only remove the <i>first</i> occurrence of the
* given object, not <i>all</i> occurrences.
* this method should only remove the <em>first</em> occurrence of the
* given object, not <em>all</em> occurrences.
* </p>
*
* @param object the object to remove
Expand All @@ -154,7 +154,7 @@ public interface Bag<E> extends Collection<E> {
boolean remove(Object object, int nCopies);

/**
* <i>(Violation)</i>
* <em>(Violation)</em>
* Remove all elements represented in the given collection,
* respecting cardinality. That is, if the given collection
* {@code coll} contains {@code n} copies of a given object,
Expand All @@ -163,8 +163,8 @@ public interface Bag<E> extends Collection<E> {
*
* <p>
* The {@link Collection#removeAll(Collection)} method specifies
* that cardinality should <i>not</i> be respected; this method should
* remove <i>all</i> occurrences of every object contained in the
* that cardinality should <em>not</em> be respected; this method should
* remove <em>all</em> occurrences of every object contained in the
* given collection.
* </p>
*
Expand All @@ -175,7 +175,7 @@ public interface Bag<E> extends Collection<E> {
boolean removeAll(Collection<?> coll);

/**
* <i>(Violation)</i>
* <em>(Violation)</em>
* Remove any members of the bag that are not in the given
* collection, respecting cardinality. That is, if the given
* collection {@code coll} contains {@code n} copies of a
Expand All @@ -187,8 +187,8 @@ public interface Bag<E> extends Collection<E> {
*
* <p>
* The {@link Collection#retainAll(Collection)} method specifies
* that cardinality should <i>not</i> be respected; this method should
* keep <i>all</i> occurrences of every object contained in the
* that cardinality should <em>not</em> be respected; this method should
* keep <em>all</em> occurrences of every object contained in the
* given collection.
* </p>
*
Expand Down
78 changes: 39 additions & 39 deletions src/main/java/org/apache/commons/collections4/CollectionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public static <T> boolean addIgnoreNull(final Collection<T> collection, final T
}

/**
* Returns the number of occurrences of <i>obj</i> in <i>coll</i>.
* Returns the number of occurrences of <em>obj</em> in <em>coll</em>.
*
* @param obj the object to find the cardinality of
* @param collection the {@link Iterable} to search
Expand Down Expand Up @@ -591,7 +591,7 @@ public static <I, O> Collection<O> collect(final Iterator<I> inputIterator,
* which is the same behavior as {@link Collection#containsAll(Collection)}.
* <p>
* In other words, this method returns {@code true} iff the
* {@link #intersection} of <i>coll1</i> and <i>coll2</i> has the same cardinality as
* {@link #intersection} of <em>coll1</em> and <em>coll2</em> has the same cardinality as
* the set of unique values from {@code coll2}. In case {@code coll2} is empty, {@code true}
* will be returned.
* </p>
Expand Down Expand Up @@ -642,7 +642,7 @@ public static boolean containsAll(final Collection<?> coll1, final Collection<?>
* Returns {@code true} iff at least one element is in both collections.
* <p>
* In other words, this method returns {@code true} iff the
* {@link #intersection} of <i>coll1</i> and <i>coll2</i> is not empty.
* {@link #intersection} of <em>coll1</em> and <em>coll2</em> is not empty.
* </p>
*
* @param coll1 the first collection, must not be null
Expand Down Expand Up @@ -675,7 +675,7 @@ public static boolean containsAny(final Collection<?> coll1, final Collection<?>
* Returns {@code true} iff at least one element is in both collections.
* <p>
* In other words, this method returns {@code true} iff the
* {@link #intersection} of <i>coll1</i> and <i>coll2</i> is not empty.
* {@link #intersection} of <em>coll1</em> and <em>coll2</em> is not empty.
* </p>
*
* @param <T> the type of object to lookup in {@code coll1}.
Expand Down Expand Up @@ -727,10 +727,10 @@ public static <C> int countMatches(final Iterable<C> input, final Predicate<? su
* Returns a {@link Collection} containing the exclusive disjunction
* (symmetric difference) of the given {@link Iterable}s.
* <p>
* The cardinality of each element <i>e</i> in the returned
* The cardinality of each element <em>e</em> in the returned
* {@link Collection} will be equal to
* <code>max(cardinality(<i>e</i>,<i>a</i>),cardinality(<i>e</i>,<i>b</i>)) - min(cardinality(<i>e</i>,<i>a</i>),
* cardinality(<i>e</i>,<i>b</i>))</code>.
* <code>max(cardinality(<em>e</em>,<em>a</em>),cardinality(<em>e</em>,<em>b</em>)) - min(cardinality(<em>e</em>,<em>a</em>),
* cardinality(<em>e</em>,<em>b</em>))</code>.
* </p>
* <p>
* This is equivalent to
Expand Down Expand Up @@ -1189,9 +1189,9 @@ public static boolean isEmpty(final Collection<?> coll) {
* Returns {@code true} iff the given {@link Collection}s contain
* exactly the same elements with exactly the same cardinalities.
* <p>
* That is, iff the cardinality of <i>e</i> in <i>a</i> is
* equal to the cardinality of <i>e</i> in <i>b</i>,
* for each element <i>e</i> in <i>a</i> or <i>b</i>.
* That is, iff the cardinality of <em>e</em> in <em>a</em> is
* equal to the cardinality of <em>e</em> in <em>b</em>,
* for each element <em>e</em> in <em>a</em> or <em>b</em>.
* </p>
*
* @param a the first collection, must not be null
Expand Down Expand Up @@ -1221,9 +1221,9 @@ public static boolean isEqualCollection(final Collection<?> a, final Collection<
* Returns {@code true} iff the given {@link Collection}s contain
* exactly the same elements with exactly the same cardinalities.
* <p>
* That is, iff the cardinality of <i>e</i> in <i>a</i> is
* equal to the cardinality of <i>e</i> in <i>b</i>,
* for each element <i>e</i> in <i>a</i> or <i>b</i>.
* That is, iff the cardinality of <em>e</em> in <em>a</em> is
* equal to the cardinality of <em>e</em> in <em>b</em>,
* for each element <em>e</em> in <em>a</em> or <em>b</em>.
* </p>
* <p>
* <b>Note:</b> from version 4.1 onwards this method requires the input
Expand Down Expand Up @@ -1303,24 +1303,24 @@ public static boolean isNotEmpty(final Collection<?> coll) {
}

/**
* Returns {@code true} iff <i>a</i> is a <i>proper</i> sub-collection of <i>b</i>,
* that is, iff the cardinality of <i>e</i> in <i>a</i> is less
* than or equal to the cardinality of <i>e</i> in <i>b</i>,
* for each element <i>e</i> in <i>a</i>, and there is at least one
* element <i>f</i> such that the cardinality of <i>f</i> in <i>b</i>
* is strictly greater than the cardinality of <i>f</i> in <i>a</i>.
* Returns {@code true} iff <em>a</em> is a <em>proper</em> sub-collection of <em>b</em>,
* that is, iff the cardinality of <em>e</em> in <em>a</em> is less
* than or equal to the cardinality of <em>e</em> in <em>b</em>,
* for each element <em>e</em> in <em>a</em>, and there is at least one
* element <em>f</em> such that the cardinality of <em>f</em> in <em>b</em>
* is strictly greater than the cardinality of <em>f</em> in <em>a</em>.
* <p>
* The implementation assumes
* </p>
* <ul>
* <li>{@code a.size()} and {@code b.size()} represent the
* total cardinality of <i>a</i> and <i>b</i>, resp. </li>
* total cardinality of <em>a</em> and <em>b</em>, resp. </li>
* <li>{@code a.size() &lt; Integer.MAXVALUE}</li>
* </ul>
*
* @param a the first (sub?) collection, must not be null
* @param b the second (super?) collection, must not be null
* @return {@code true} iff <i>a</i> is a <i>proper</i> sub-collection of <i>b</i>
* @return {@code true} iff <em>a</em> is a <em>proper</em> sub-collection of <em>b</em>
* @throws NullPointerException if either collection is null
* @see #isSubCollection
* @see Collection#containsAll
Expand All @@ -1332,14 +1332,14 @@ public static boolean isProperSubCollection(final Collection<?> a, final Collect
}

/**
* Returns {@code true} iff <i>a</i> is a sub-collection of <i>b</i>,
* that is, iff the cardinality of <i>e</i> in <i>a</i> is less than or
* equal to the cardinality of <i>e</i> in <i>b</i>, for each element <i>e</i>
* in <i>a</i>.
* Returns {@code true} iff <em>a</em> is a sub-collection of <em>b</em>,
* that is, iff the cardinality of <em>e</em> in <em>a</em> is less than or
* equal to the cardinality of <em>e</em> in <em>b</em>, for each element <em>e</em>
* in <em>a</em>.
*
* @param a the first (sub?) collection, must not be null
* @param b the second (super?) collection, must not be null
* @return {@code true} iff <i>a</i> is a sub-collection of <i>b</i>
* @return {@code true} iff <em>a</em> is a sub-collection of <em>b</em>
* @throws NullPointerException if either collection is null
* @see #isProperSubCollection
* @see Collection#containsAll
Expand Down Expand Up @@ -1946,10 +1946,10 @@ public static boolean sizeIsEmpty(final Object object) {
}

/**
* Returns a new {@link Collection} containing {@code <i>a</i> - <i>b</i>}.
* The cardinality of each element <i>e</i> in the returned {@link Collection}
* will be the cardinality of <i>e</i> in <i>a</i> minus the cardinality
* of <i>e</i> in <i>b</i>, or zero, whichever is greater.
* Returns a new {@link Collection} containing {@code <em>a</em> - <em>b</em>}.
* The cardinality of each element <em>e</em> in the returned {@link Collection}
* will be the cardinality of <em>e</em> in <em>a</em> minus the cardinality
* of <em>e</em> in <em>b</em>, or zero, whichever is greater.
*
* @param a the collection to subtract from, must not be null
* @param b the collection to subtract, must not be null
Expand All @@ -1964,23 +1964,23 @@ public static <O> Collection<O> subtract(final Iterable<? extends O> a, final It
}

/**
* Returns a new {@link Collection} containing <i>a</i> minus a subset of
* <i>b</i>. Only the elements of <i>b</i> that satisfy the predicate
* condition, <i>p</i> are subtracted from <i>a</i>.
* Returns a new {@link Collection} containing <em>a</em> minus a subset of
* <em>b</em>. Only the elements of <em>b</em> that satisfy the predicate
* condition, <em>p</em> are subtracted from <em>a</em>.
*
* <p>
* The cardinality of each element <i>e</i> in the returned {@link Collection}
* that satisfies the predicate condition will be the cardinality of <i>e</i> in <i>a</i>
* minus the cardinality of <i>e</i> in <i>b</i>, or zero, whichever is greater.
* The cardinality of each element <em>e</em> in the returned {@link Collection}
* that satisfies the predicate condition will be the cardinality of <em>e</em> in <em>a</em>
* minus the cardinality of <em>e</em> in <em>b</em>, or zero, whichever is greater.
* </p>
* <p>
* The cardinality of each element <i>e</i> in the returned {@link Collection} that does <b>not</b>
* satisfy the predicate condition will be equal to the cardinality of <i>e</i> in <i>a</i>.
* The cardinality of each element <em>e</em> in the returned {@link Collection} that does <b>not</b>
* satisfy the predicate condition will be equal to the cardinality of <em>e</em> in <em>a</em>.
* </p>
*
* @param a the collection to subtract from, must not be null
* @param b the collection to subtract, must not be null
* @param p the condition used to determine which elements of <i>b</i> are
* @param p the condition used to determine which elements of <em>b</em> are
* subtracted.
* @param <O> the generic type that is able to represent the types contained
* in both input collections.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/collections4/ListUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ public static <E> List<E> intersection(final List<? extends E> list1, final List
* Compares the two list objects for equality. Returns
* {@code true} if and only if both
* lists have the same size, and all corresponding pairs of elements in
* the two lists are <i>equal</i>. (Two elements {@code e1} and
* {@code e2} are <i>equal</i> if <code>(e1==null ? e2==null :
* the two lists are <em>equal</em>. (Two elements {@code e1} and
* {@code e2} are <em>equal</em> if <code>(e1==null ? e2==null :
* e1.equals(e2))</code>.) In other words, two lists are defined to be
* equal if they contain the same elements in the same order. This
* definition ensures that the equals method works properly across
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public interface ListValuedMap<K, V> extends MultiValuedMap<K, V> {
/**
* Removes all values associated with the specified key.
* <p>
* The returned list <i>may</i> be modifiable, but updates will not be
* The returned list <em>may</em> be modifiable, but updates will not be
* propagated to this list-valued map. In case no mapping was stored for the
* specified key, an empty, unmodifiable list will be returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public interface MultiValuedMap<K, V> {
/**
* Removes all values associated with the specified key.
* <p>
* The returned collection <i>may</i> be modifiable, but updates will not be propagated
* The returned collection <em>may</em> be modifiable, but updates will not be propagated
* to this multivalued map. In case no mapping was stored for the specified
* key, an empty, unmodifiable collection will be returned.
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface SetValuedMap<K, V> extends MultiValuedMap<K, V> {
/**
* Removes all values associated with the specified key.
* <p>
* The returned set <i>may</i> be modifiable, but updates will not be
* The returned set <em>may</em> be modifiable, but updates will not be
* propagated to this set-valued map. In case no mapping was stored for the
* specified key, an empty, unmodifiable set will be returned.
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public CollectionBag(final Bag<E> bag) {
}

/**
* <i>(Change)</i>
* <em>(Change)</em>
* Adds one copy of the specified object to the Bag.
* <p>
* Since this method always increases the size of the bag, it
Expand All @@ -82,7 +82,7 @@ public boolean add(final E object) {
}

/**
* <i>(Change)</i>
* <em>(Change)</em>
* Adds {@code count} copies of the specified object to the Bag.
* <p>
* Since this method always increases the size of the bag, it
Expand Down Expand Up @@ -111,7 +111,7 @@ public boolean addAll(final Collection<? extends E> coll) {
}

/**
* <i>(Change)</i>
* <em>(Change)</em>
* Returns {@code true} if the bag contains all elements in
* the given collection, <b>not</b> respecting cardinality. That is,
* if the given collection {@code coll} contains at least one of
Expand Down Expand Up @@ -140,7 +140,7 @@ private void readObject(final ObjectInputStream in) throws IOException, ClassNot
}

/**
* <i>(Change)</i>
* <em>(Change)</em>
* Removes the first occurrence of the given object from the bag.
* <p>
* This will also remove the object from the {@link #uniqueSet()} if the
Expand All @@ -155,9 +155,9 @@ public boolean remove(final Object object) {
}

/**
* <i>(Change)</i>
* <em>(Change)</em>
* Remove all elements represented in the given collection,
* <b>not</b> respecting cardinality. That is, remove <i>all</i>
* <b>not</b> respecting cardinality. That is, remove <em>all</em>
* occurrences of every object contained in the given collection.
*
* @param coll the collection to remove
Expand All @@ -178,9 +178,9 @@ public boolean removeAll(final Collection<?> coll) {
}

/**
* <i>(Change)</i>
* <em>(Change)</em>
* Remove any members of the bag that are not in the given collection,
* <i>not</i> respecting cardinality. That is, any object in the given
* <em>not</em> respecting cardinality. That is, any object in the given
* collection {@code coll} will be retained in the bag with the same
* number of copies prior to this operation. All other objects will be
* completely removed from this bag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public <T> T[] toArray(final T[] array) {
* Returns a new collection containing all of the elements
*
* @return A new ArrayList containing all of the elements in this composite.
* The new collection is <i>not</i> backed by this composite.
* The new collection is <em>not</em> backed by this composite.
*/
public Collection<E> toCollection() {
return new ArrayList<>(this);
Expand Down
Loading

0 comments on commit 4a73b69

Please sign in to comment.