This interface defines methods for accessing RDF Bag resources. These methods operate on the RDF statements contained in a model. The Bag implementation may cache state from the underlying model, so objects should not be added to or removed a the Bag by directly manipulating its properties, whilst the Bag is being accessed through this interface.
When a member is deleted from a Bag using this interface, or an iterator returned through this interface, all the other members with higher ordinals are renumbered using an implementation dependent algorithm.
Suppose you have a Bag that contains {a, a, b, c}
. Calling {@link #getCount(Object)} on a
would return 2, whilecalling {@link #uniqueSet()} would return {a, b, c}
.
NOTE: This interface violates the {@link Collection} contract. The behavior specified in many of these methods is not the same as the behavior specified by Collection
. The noncompliant methods are clearly marked with "(Violation)". Exercise caution when using a bag as a Collection
.
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. @since Commons Collections 2.0 @version $Revision: 1.18 $ $Date: 2004/05/03 15:12:20 $ @author Chuck Burdick @author Stephen Colebourne
{a, a, b, c}
. Calling {@link #getCount(Object)} on a
would return 2, whilecalling {@link #uniqueSet()} would return {a, b, c}
. NOTE: This interface violates the {@link Collection} contract.The behavior specified in many of these methods is not the same as the behavior specified by Collection
. The noncompliant methods are clearly marked with "(Violation)". Exercise caution when using a bag as a Collection
. 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.
@author Chuck Burdick
@author Matt Hall, John Watkinson, Stephen Colebourne
@version $Revision: 1.1 $ $Date: 2005/10/11 17:05:19 $
@since Commons Collections 2.0
Suppose you have a Bag that contains {a, a, b, c}
. Calling {@link #getCount(Object)} on a
would return 2, whilecalling {@link #uniqueSet()} would return {a, b, c}
.
NOTE: This interface violates the {@link Collection} contract.The behavior specified in many of these methods is not the same as the behavior specified by Collection
. The noncompliant methods are clearly marked with "(Violation)". Exercise caution when using a bag as a Collection
.
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. @param < E> the type held in the bag @since 2.0 @version $Id: Bag.java 1477779 2013-04-30 18:55:24Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|