Javadoc fixes, removed unneeded imports.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1353150 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-06-23 15:40:11 +00:00
parent c2d22264b0
commit 8ebc1a038c
2 changed files with 16 additions and 16 deletions

View File

@ -26,17 +26,17 @@ import java.util.Set;
* <p>
* Suppose you have a Bag that contains <code>{a, a, b, c}</code>.
* Calling {@link #getCount(Object)} on <code>a</code> would return 2, while
* calling {@link #uniqueSet()} would return <code>{a, b, c}</code>.
* calling {@link #uniqueSet()} would return <code>{a, b, c}</code>.</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
* as the behavior specified by <code>Collection</code>.
* The noncompliant methods are clearly marked with "(Violation)".
* Exercise caution when using a bag as a <code>Collection</code>.
* Exercise caution when using a bag as a <code>Collection</code>.</p>
* <p>
* This violation resulted from the original specification of this interface.
* In an ideal world, the interface would be changed to fix the problems, however
* it has been decided to maintain backwards compatibility instead.
* it has been decided to maintain backwards compatibility instead.</p>
*
* @param <E> the type held in the bag
* @since Commons Collections 2.0
@ -63,12 +63,12 @@ public interface Bag<E> extends Collection<E> {
* <p>
* If the object is already in the {@link #uniqueSet()} then increment its
* count as reported by {@link #getCount(Object)}. Otherwise add it to the
* {@link #uniqueSet()} and report its count as 1.
* {@link #uniqueSet()} and report its count as 1.</p>
* <p>
* Since this method always increases the size of the bag,
* according to the {@link Collection#add(Object)} contract, it
* should always return <code>true</code>. Since it sometimes returns
* <code>false</code>, this method violates the contract.
* <code>false</code>, this method violates the contract.</p>
*
* @param object the object to add
* @return <code>true</code> if the object was not already in the <code>uniqueSet</code>
@ -80,7 +80,7 @@ public interface Bag<E> extends Collection<E> {
* <p>
* If the object is already in the {@link #uniqueSet()} then increment its
* count as reported by {@link #getCount(Object)}. Otherwise add it to the
* {@link #uniqueSet()} and report its count as <code>nCopies</code>.
* {@link #uniqueSet()} and report its count as <code>nCopies</code>.</p>
*
* @param object the object to add
* @param nCopies the number of copies to add
@ -92,12 +92,13 @@ public interface Bag<E> extends Collection<E> {
* <i>(Violation)</i>
* Removes all occurrences of the given object from the bag.
* <p>
* This will also remove the object from the {@link #uniqueSet()}.
* 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.
* given object, not <i>all</i> occurrences.</p>
*
* @param object the object to remove
* @return <code>true</code> if this call changed the collection
*/
boolean remove(Object object);
@ -106,7 +107,7 @@ public interface Bag<E> extends Collection<E> {
* Removes <code>nCopies</code> copies of the specified object from the Bag.
* <p>
* If the number of copies to remove is greater than the actual number of
* copies in the Bag, no error is thrown.
* copies in the Bag, no error is thrown.</p>
*
* @param object the object to remove
* @param nCopies the number of copies to remove
@ -117,7 +118,7 @@ public interface Bag<E> extends Collection<E> {
/**
* Returns a {@link Set} of unique elements in the Bag.
* <p>
* Uniqueness constraints are the same as those in {@link java.util.Set}.
* Uniqueness constraints are the same as those in {@link java.util.Set}.</p>
*
* @return the Set of unique Bag elements
*/
@ -141,7 +142,7 @@ public interface Bag<E> extends Collection<E> {
* The {@link Collection#containsAll(Collection)} method specifies
* that cardinality should <i>not</i> be respected; this method should
* return true if the bag contains at least one of every object contained
* in the given collection.
* in the given collection.</p>
*
* @param coll the collection to check against
* @return <code>true</code> if the Bag contains all the collection
@ -156,10 +157,10 @@ public interface Bag<E> extends Collection<E> {
* the bag will have <code>n</code> fewer copies, assuming the bag
* had at least <code>n</code> copies to begin with.
*
* <P>The {@link Collection#removeAll(Collection)} method specifies
* <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
* given collection.
* given collection.</p>
*
* @param coll the collection to remove
* @return <code>true</code> if this call changed the collection
@ -177,10 +178,10 @@ public interface Bag<E> extends Collection<E> {
* <code>!coll.contains(e)</code>, then remove <code>e</code> and any
* of its copies.
*
* <P>The {@link Collection#retainAll(Collection)} method specifies
* <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
* given collection.
* given collection.</p>
*
* @param coll the collection to retain
* @return <code>true</code> if this call changed the collection

View File

@ -22,7 +22,6 @@ import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Map;
import org.apache.commons.collections.Get;
import org.apache.commons.collections.Put;
import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.map.LinkedMap;