#include <coherence/util/SortedBag.hpp>
Inherits SortedBag.
This view is backed by the SortedBag, so any modifications made to it are visible to the underlying bag, and vice-versa.
Public Types | ||||||||||||||||
typedef spec::Handle | Handle | |||||||||||||||
ViewBag Handle definition. | ||||||||||||||||
typedef spec::View | View | |||||||||||||||
ViewBag View definition. | ||||||||||||||||
typedef spec::Holder | Holder | |||||||||||||||
ViewBag Holder definition. | ||||||||||||||||
Public Member Functions | ||||||||||||||||
virtual bool | add (Object::Holder oh) | |||||||||||||||
Add the given element to this collection.
This implementation will throw a coherence::lang::UnsupportedOperationException | ||||||||||||||||
virtual SortedBag::Handle | subBag (Object::View vFrom, Object::View vTo) | |||||||||||||||
Returns a view of the portion of this bag whose elements range from vFrom , inclusive, to vTo , exclusive.
(If
The returned bag will throw an
| ||||||||||||||||
virtual SortedBag::View | subBag (Object::View vFrom, Object::View vTo) const | |||||||||||||||
virtual SortedBag::Handle | headBag (Object::View vTo) | |||||||||||||||
Returns a view of the portion of this bag whose elements are strictly less than vTo .The returned bag is backed by this bag, so changes in the returned bag are reflected in this bag, and vice-versa. The returned bag supports all optional bag operations that this bag supports.
The returned bag will throw an
| ||||||||||||||||
virtual SortedBag::View | headBag (Object::View vTo) const | |||||||||||||||
virtual SortedBag::Handle | tailBag (Object::View vFrom) | |||||||||||||||
Returns a view of the portion of this bag whose elements are greater than or equal to vFrom .The returned bag is backed by this bag, so changes in the returned bag are reflected in this bag, and vice-versa. The returned bag supports all optional bag operations that this bag supports.
The returned bag will throw an
| ||||||||||||||||
virtual SortedBag::View | tailBag (Object::View vFrom) const | |||||||||||||||
Protected Member Functions | ||||||||||||||||
ViewBag (SortedBag::Holder ohBag, Object::View vFrom, Object::View vTo) | ||||||||||||||||
Construct a view of the SortedBag, constrained to the range [ohFrom, ohTo). | ||||||||||||||||
void | checkRange (Object::View v) const | |||||||||||||||
Check that the specified object is within the range of this view. | ||||||||||||||||
Protected Attributes | ||||||||||||||||
FinalHolder< SortedBag > | f_ohBag | |||||||||||||||
The "outer this". | ||||||||||||||||
FinalView< Object > | f_vFrom | |||||||||||||||
The (inclusive) lower bound of this view. | ||||||||||||||||
FinalView< Object > | f_vTo | |||||||||||||||
The (exclusive) upper bound of this view. |
ViewBag | ( | SortedBag::Holder | ohBag, | |
Object::View | vFrom, | |||
Object::View | vTo | |||
) | [protected] |
Construct a view of the SortedBag, constrained to the range [ohFrom, ohTo).
ohBag | reference to the "outer this" | |
vFrom | the "from" element (inclusive), or null | |
vTo | the "to" element (exclusive), or null |
void checkRange | ( | Object::View | v | ) | const [protected] |
Check that the specified object is within the range of this view.
v | the object to check |