KosCollection Object Services | 16 | ![]() |
The KosCollection module is defined in the file named:
It's version information is:
$Id: KosCollection.idl,v 1.23 1997-08-07 17:03:18-04 wlf Exp $
It is defined in the Java package named:
org.cert.KosCollection
module KosCollection
{
Forward declarations:
interface Bag;
interface BagFactory;
interface Collection;
interface CollectionFactories;
interface CollectionFactory;
interface Command;
interface Comparator;
interface Deque;
interface DequeFactory;
interface EqualityCollection;
interface EqualityIterator;
interface EqualityKeyCollection;
interface EqualityKeyIterator;
interface EqualityKeySortedCollection;
interface EqualityKeySortedIterator;
interface EqualitySequence;
interface EqualitySequenceFactory;
interface EqualitySequentialCollection;
interface EqualitySequentialIterator;
interface EqualitySortedCollection;
interface EqualitySortedIterator;
interface Heap;
interface HeapFactory;
interface Iterator;
interface KeyBag;
interface KeyBagFactory;
interface KeyCollection;
interface KeyIterator;
interface KeySet;
interface KeySetFactory;
interface KeySortedBag;
interface KeySortedBagFactory;
interface KeySortedCollection;
interface KeySortedIterator;
interface KeySortedSet;
interface KeySortedSetFactory;
interface Map;
interface MapFactory;
interface Operations;
interface OrderedCollection;
interface OrderedIterator;
interface PriorityQueue;
interface PriorityQueueFactory;
interface Queue;
interface QueueFactory;
interface Relation;
interface RelationFactory;
interface RestrictedAccessCollection;
interface Sequence;
interface SequenceFactory;
interface SequentialCollection;
interface SequentialIterator;
interface Set;
interface SetFactory;
interface SortedBag;
interface SortedBagFactory;
interface SortedCollection;
interface SortedIterator;
interface SortedMap;
interface SortedMapFactory;
interface SortedRelation;
interface SortedRelationFactory;
interface SortedSet;
interface SortedSetFactory;
interface Stack;
interface StackFactory;
Sequence declarations:
typedef sequence<Bag> SeqOfBag;
typedef sequence<BagFactory> SeqOfBagFactory;
typedef sequence<Collection> SeqOfCollection;
typedef sequence<CollectionFactories> SeqOfCollectionFactories;
typedef sequence<CollectionFactory> SeqOfCollectionFactory;
typedef sequence<Command> SeqOfCommand;
typedef sequence<Comparator> SeqOfComparator;
typedef sequence<Deque> SeqOfDeque;
typedef sequence<DequeFactory> SeqOfDequeFactory;
typedef sequence<EqualityCollection> SeqOfEqualityCollection;
typedef sequence<EqualityIterator> SeqOfEqualityIterator;
typedef sequence<EqualityKeyCollection> SeqOfEqualityKeyCollection;
typedef sequence<EqualityKeyIterator> SeqOfEqualityKeyIterator;
typedef sequence<EqualityKeySortedCollection> SeqOfEqualityKeySortedCollection;
typedef sequence<EqualityKeySortedIterator> SeqOfEqualityKeySortedIterator;
typedef sequence<EqualitySequence> SeqOfEqualitySequence;
typedef sequence<EqualitySequenceFactory> SeqOfEqualitySequenceFactory;
typedef sequence<EqualitySequentialCollection> SeqOfEqualitySequentialCollection;
typedef sequence<EqualitySequentialIterator> SeqOfEqualitySequentialIterator;
typedef sequence<EqualitySortedCollection> SeqOfEqualitySortedCollection;
typedef sequence<EqualitySortedIterator> SeqOfEqualitySortedIterator;
typedef sequence<Heap> SeqOfHeap;
typedef sequence<HeapFactory> SeqOfHeapFactory;
typedef sequence<Iterator> SeqOfIterator;
typedef sequence<KeyBag> SeqOfKeyBag;
typedef sequence<KeyBagFactory> SeqOfKeyBagFactory;
typedef sequence<KeyCollection> SeqOfKeyCollection;
typedef sequence<KeyIterator> SeqOfKeyIterator;
typedef sequence<KeySet> SeqOfKeySet;
typedef sequence<KeySetFactory> SeqOfKeySetFactory;
typedef sequence<KeySortedBag> SeqOfKeySortedBag;
typedef sequence<KeySortedBagFactory> SeqOfKeySortedBagFactory;
typedef sequence<KeySortedCollection> SeqOfKeySortedCollection;
typedef sequence<KeySortedIterator> SeqOfKeySortedIterator;
typedef sequence<KeySortedSet> SeqOfKeySortedSet;
typedef sequence<KeySortedSetFactory> SeqOfKeySortedSetFactory;
typedef sequence<Map> SeqOfMap;
typedef sequence<MapFactory> SeqOfMapFactory;
typedef sequence<Operations> SeqOfOperations;
typedef sequence<OrderedCollection> SeqOfOrderedCollection;
typedef sequence<OrderedIterator> SeqOfOrderedIterator;
typedef sequence<PriorityQueue> SeqOfPriorityQueue;
typedef sequence<PriorityQueueFactory> SeqOfPriorityQueueFactory;
typedef sequence<Queue> SeqOfQueue;
typedef sequence<QueueFactory> SeqOfQueueFactory;
typedef sequence<Relation> SeqOfRelation;
typedef sequence<RelationFactory> SeqOfRelationFactory;
typedef sequence<RestrictedAccessCollection> SeqOfRestrictedAccessCollection;
typedef sequence<Sequence> SeqOfSequence;
typedef sequence<SequenceFactory> SeqOfSequenceFactory;
typedef sequence<SequentialCollection> SeqOfSequentialCollection;
typedef sequence<SequentialIterator> SeqOfSequentialIterator;
typedef sequence<Set> SeqOfSet;
typedef sequence<SetFactory> SeqOfSetFactory;
typedef sequence<SortedBag> SeqOfSortedBag;
typedef sequence<SortedBagFactory> SeqOfSortedBagFactory;
typedef sequence<SortedCollection> SeqOfSortedCollection;
typedef sequence<SortedIterator> SeqOfSortedIterator;
typedef sequence<SortedMap> SeqOfSortedMap;
typedef sequence<SortedMapFactory> SeqOfSortedMapFactory;
typedef sequence<SortedRelation> SeqOfSortedRelation;
typedef sequence<SortedRelationFactory> SeqOfSortedRelationFactory;
typedef sequence<SortedSet> SeqOfSortedSet;
typedef sequence<SortedSetFactory> SeqOfSortedSetFactory;
typedef sequence<Stack> SeqOfStack;
typedef sequence<StackFactory> SeqOfStackFactory;
exception EmptyCollection {
};
exception PositionInvalid {
};
exception IteratorInBetween {
};
exception KeyInvalid {
};
typedef sequence<any> AnySequence;
enum IteratorInvalidReason
{
is_invalid,
is_not_for_collection,
is_const
};
exception IteratorInvalid {
IteratorInvalidReason why;
};
enum ElementInvalidreason
{
element_type_invalid,
positioning_property_invalid,
element_exists
};
exception ElementInvalid {
ElementInvalidreason why;
};
exception ParameterInvalid {
};
typedef string Istring;
struct NVPair {
Istring name;
any value;
};
typedef sequence<NVPair> ParameterList;
interface Operations {
attribute TypeCode element_type;
attribute TypeCode key_type;
boolean check_element_type(
in any element
);
boolean equal(
in any element1,
in any element2
);
long compare(
in any element1,
in any element2
);
unsigned long hash(
in any element,
in unsigned long value
);
any key(
in any element
);
boolean check_key_type(
in any key
);
boolean key_equal(
in any key1,
in any key2
);
long key_compare(
in any key1,
in any key2
);
unsigned long key_hash(
in any key,
in unsigned long value
);
void destroy();
};
interface Command {
boolean do_on(
in any element
);
};
enum LowerBoundStyle
{
equal_lo,
greater,
greater_or_equal
};
enum UpperBoundStyle
{
equal_up,
less,
less_or_equal
};
interface Iterator : KosAppService::Version {
The iterator is set to the first element in iteration order of the collection it belongs to. If the collection is empty, that is, if no first element exists, the iterator is invalidated. Returns true if the collection it belongs to is not empty.
boolean set_to_first_element();
Sets the iterator to the next element in the collection in iteration order or invalidates the iterator if no more elements are to be visited. If the iterator is in the state in-between the iterator is set to its “potential next” element. Returns true if there is a next element. The iterator must be valid, otherwise the exception IteratorInvalid is raised.
boolean set_to_next_element();
Sets the iterator to the element n movements away in collection iteration order or invalidates the iterator if there is no such element. If the iterator is in the state in-between the movement to the “potential next” element is the first of the n movements. Returns true if there is such an element. The iterator must be valid, otherwise the exception IteratorInvalid is raised
boolean set_to_next_nth_element(
in unsigned long n
);
Retrieves the element pointed and returns it via the output parameter element. Returns true it an element was retrieved. The iterator must point to an element of the collection otherwise the exception IteratorInvalid or IteratorInBetween is raised.
boolean retrieve_element(
out any element
);
Retrieves the element pointed to and returns it via the output parameter element.The iterator is moved to the next element in iteration order. If there is a next element more is set to true. If there is no next element anymore, the iterator is invalidated and more is set to false. Returns true if an element was retrieved. The iterator must be valid and point to an element, otherwise the exception IteratorInvalid or IteratorInBetween is raised.
boolean retrieve_element_set_to_next(
out any element,
out boolean more
);
Retrieves at most the next n elements in iteration order of the iterator’s collection and returns them as sequence of any’s via the output parameter result. Counting starts with the element the iterator points to. The iterator is moved behind the last element retrieved. If there is an element behind the last element retrieved more is set to true. If there is no element anymore behind the last element retrieved or there are less than n elements for retrieval the iterator is invalidated and more is set to false. If the value of n is 0, all elements in the collection until the end is reached, are retrieved. Returns true if at least one element is retrieved. The iterator must be valid and point to an element, otherwise the exception IteratorInvalid or IteratorInBetween is raised.
boolean retrieve_next_n_elements(
in unsigned long n,
out AnySequence result,
out boolean more
);
Compares the given iterator test with this iterator. If they are not equal the element pointed to by this iterator is retrieved and returned via the output parameter element, the iterator is moved to the next element and true is returned. If they are equal the element pointed to by this iterator is retrieved and returned via the output parameter element, the iterator is not moved to the next element and false is returned. Returns true if this iterator is not equal to the test iterator at the begin of the operation. The iterator and the given iterator test must be valid and point to an element each otherwise the exception IteratorInvalid is raised.
boolean not_equal_retrieve_element_set_to_next(
in Iterator test,
out any element
);
Removes the element pointed to by this iterator and sets the iterator in-between. The iterator must be valid and point to an element of the collection, otherwise the exception IteratorInvalid or IteratorInBetween is raised. The iterator must not have the const designation otherwise the exception IteratorInvalid is raised. Other valid iterators pointing to the removed element go in-between. All other iterators keep their state.
void remove_element();
Removes the element pointed to by this iterator and moves the iterator to the next element. Returns true if a next element exists. The iterator must be valid and point to an element of the collection, otherwise the exception IteratorInvalid is raised. The iterator must not have the const designation otherwise the exception IteratorInvalid is raised. Other valid iterators pointing to the removed element go in-between. All other iterators keep their state.
boolean remove_element_set_to_next();
Removes at most the next n elements in iteration order of the iterator’s collection. Counting starts with the element the iterator points to. The iterator is moved to the next element behind the last element removed. If there is no element anymore behind the last element removed or there are less than n elements for removal the iterator is invalidated. If the value of n is 0, all elements in the collection until the end is reached, are removed. The output parameter actual_number is set to the actually removed number of elements. If the value of n is 0, all elements in the collection until the end is reached, are removed. Returns true if the iterator is not invalidated The iterator must be valid and point to an element, otherwise the exception IteratorInvalid or IteratorInBetween is raised. The iterator must not have the const designation otherwise the exception IteratorInvalid is raised. Other valid iterators pointing to removed elements go in-between. All other iterators keep their state.
boolean remove_next_n_elements(
in unsigned long n,
out unsigned long actual_number
);
Compares this iterator with the given iterator test. If they are not equal the element this iterators points to is removed and the iterator is set to the next element, and true is returned. If they are equal the element pointed to is removed, the iterator is set in-between, and false is returned. Returns true if this iterator and the given iterator test are not equal when the operations starts. This iterator and the given iterator test must be valid otherwise the exception IteratorInvalid or IteratorInBetween is raised. This iterator and the given iterator test must not have a const designation otherwise the exception IteratorInvalid is raised. Other valid iterators pointing to removed elements go in-between. All other iterators keep their state.
boolean not_equal_remove_element_set_to_next(
in Iterator test
);
Replaces the element pointed to by the given element. The iterator must be valid and point to an element otherwise the exception IteratorInvalid or IteratorInBetween is raised. The iterator must not have a const designation otherwise the exception IteratorInvalid is raised. The element must be of the expected element type otherwise the ElementInvalid exception is raised. The given element must have the same positioning property as the replaced element otherwise the exception ElementInvalid is raised.
void replace_element(
in any element
);
Replaces the element pointed to by this iterator by the given element and sets the iterator to the next element. If there is no next element the iterator is invalidated. Returns true if there is a next element. The iterator must be valid and point to an element otherwise the exception IteratorInvalid or IteratorInBetween is raised. The iterator must not have a const designation otherwise the exception IteratorInvalid is raised. The element must be of the expected element type otherwise the ElementInvalid exception is raised. The given element must have the same positioning property as the replaced element otherwise the exception ElementInvalid is raised.
boolean replace_element_set_to_next(
in any element
);
Replaces at most as many elements in iteration order as given in elements by the given elements. Counting starts with the element the iterator points to. If there are less elements in the collection left to be replaced than the given number of elements as much elements as possible are replaced and the actually replaced number of elements is returned via the output parameter actual_number. The iterator is moved to the next element behind the last element replaced. If there is no element anymore behind the last element replaced or the number of elements in the collection to be replaced is less than the number given elements the iterator is invalidated. Returns true if there is a next element behind the last element replaced. The iterator must be valid and point to an element, otherwise the exception IteratorInvalid or IteratorInBetween is raised. The elements given must be of the expected type otherwise the exception ElementInvalid is raised. For each element the positioning property of the replaced element must be the same as that of the element replacing it otherwise the exception ElementInvalid is raised.
boolean replace_next_n_elements(
in AnySequence elements,
out unsigned long actual_number
);
Compares this iterator and the given iterator test. If they are not equal the element pointed to by this iterator is replaced by the given element, the iterator is set to the next element, and true is returned. If they are equal the element pointed to by this iterator is replaced by the given element and the iterator is not set to the next element, and false is returned. Returns true if this iterator and the given iterator test are not equal before the operations starts. This iterator and the given iterator must be valid and point to an element each otherwise the exception IteratorInvalid or IteratorInBetween is raised. This iterator must not have a const designation otherwise the exception IteratorInvalid is raised. The element must be of the expected element type otherwise the ElementInvalid exception is raised. The given element must have the same positioning property as the replaced element otherwise the exception ElementInvalid is raised.
boolean not_equal_replace_element_set_to_next(
in Iterator test,
in any element
);
Adds an element to the collection this iterator points to and sets the iterator to the added element. The exact semantics depends on the properties of the collection for which this iterator is created. If the collection supports unique elements or keys and the element or key is already contained in the collection, adding is ignored and the iterator is just set to the element or key already contained. In sequential collections, the element is always added as last element. In sorted collections, the element is added at a position determined by the element or key value. If the collection is a Map and contains an element with the same key as the given element, then this element has to be equal to the given element. Otherwise the exception ElementInvalid is raised. Returns true if the element was added. The element to be added must be of the expected type otherwise the exception ElementInvalid is raised.
boolean add_element_set_iterator(
in any element
);
Adds the given elements to the collection this iterator points to. The elements are added in the order of the input sequence of elements and the delivered semantics is consistent with the semantics of the add_element_set_iterator operation. It is essentially a sequence of add_element_set_iterator operations. The output parameter actual_number is set to the number of elements added.
boolean add_n_elements_set_iterator(
in AnySequence elements,
out unsigned long actual_number
);
Sets the iterator to the state invalid, that is, “pointing to nothing”. You may also say the iterator in some sense is set to “NULL”.
void invalidate();
Returns true if the Iterator is valid, that is points to an element of the collection or is in the state in-between.
boolean is_valid();
Returns true if this iterator can operate on the given collection.
boolean is_for(
in Collection a_collection
);
Returns true if this iterator is created with “const” designation.
boolean is_const();
Returns true if the iterator is in the state in-between.
boolean is_in_between();
Returns true if the given iterator points to the identical element as this iterator. The given iterator must belong to the same collection as the iterator otherwise the exception IteratorInvalid is raised
boolean is_equal(
in Iterator an_iterator
);
Creates a copy of this iterator.
Iterator clone();
Assigns the given iterator to this iterator. The given iterator must be created for the same collection as this iterator otherwise the exception IteratorInvalid is raised.
void assign(
in Iterator an_iterator
);
Destroys this iterator.
void destroy();
};
interface Collection : KosAppService::Version {
readonly attribute TypeCode element_type;
Adds an element to the collection. The exact semantics of the add operations depends on the properties of the concrete interface derived from Collection the collection is an instance of. If the collection supports unique elements or keys and the element or key is already contained in the collection, adding is ignored. In sequential collections, the element is always added as last element. In sorted collections, the element is added at a position determined by the element or key value. If the collection is a Map and contains an element with the same key as the given element, then this element has to be equal to the given element. Otherwise the exception ElementInvalid is raised. Returns true if the element is added. The element must be of the expected type otherwise the exception ElementInvalid is raised. All iterators keep their state.
boolean add_element(
in any element
)
raises(
ElementInvalid
);
Adds an element to the collection and sets the iterator to the added element. The exact semantics of the add operations depends on the properties of the concrete interface derived from Collection the collection is an instance of. If the collection supports unique elements or keys and the element or key is already contained in the collection, adding is ignored and the iterator is just set to the element or key already contained. In sequential collections, the element is always added as last element. In sorted collections, the element is added at a position determined by the element or key value. If the collection is a Map and contains an element with the same key as the given element, then this element has to be equal to the given element. Otherwise the exception ElementInvalid is raised. Returns true if the element is added. The given element must be of the expected type otherwise the exception ElementInvalid is raised. The given iterator must belong to the collection, otherwise the exception IteratorInvalid is raised. All other iterators keep their state.
boolean add_element_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
IteratorInvalid,
ElementInvalid
);
Adds all elements of the given collection to this collection. The elements are added in the iteration order of the given collection and consistent with the semantics of the add operation. Essentially, this operation is a sequence of add operations.
void add_all_from(
in Collection a_collection
)
raises(
ElementInvalid
);
Removes the element pointed to by the given iterator. The given iterator is set to in-between. The iterator must belong to the collection and must point to an element of the collection, otherwise the exception IteratorInvalid is raised. Iterators pointing to the removed element go in-between. Iterators which do not point to the removed element keep their state.
void remove_element_at(
in Iterator where
)
raises(
IteratorInvalid,
ElementInvalid
);
Removes all elements from the collection. Returns the number of elements removed. Iterators pointing to removed elements go in-between. All other iterators keep their state.
unsigned long remove_all();
Replaces the element pointed to by the iterator by the given element. The given element must have the same positioning property as the replaced element. For collections organized according to element properties, such as ordering relation, the replace operation must not change this element property. For key collections, the new key must be equal to the key replaced. For non-key collections with element equality, the new element must be equal to the replaced element as defined by the element equality relation. Sequential collections have a user defined positioning property and heaps do not have positioning properties. Element values in sequences and heaps therefore can be replaced freely. The given element must not change the positioning property otherwise the exception ElementInvalid is raised.The given element must be of the expected type otherwise the exception ElementInvalid is raised. The iterator must belong to the collection and must point to an element of the collection. Otherwise the exception IteratorInvalid or IteratorInBetween is raised.
void replace_element_at(
in Iterator where,
in any element
)
raises(
IteratorInvalid,
IteratorInBetween,
ElementInvalid
);
Retrieves the element pointed to by the given iterator and returns it via the output parameter element. Returns true if an element is retrieved. The given iterator must belong to the collection and must point to an element of the collection; otherwise the exception IteratorInvalid or IteratorInBetween is raised. Note: Whether a copy of the element is returned or the element itself depends on the element type represented by the any. If it is an object, a reference to the object in the collection is returned. If the element type is a non-object type, a copy of the element is returned. So in case of element type object, do not manipulate the element or the key of the element in the collection in a way that changes the positioning property of the element.
boolean retrieve_element_at(
in Iterator where,
out any element
)
raises(
IteratorInvalid,
IteratorInBetween
);
Calls the “do_on()” operation of the given Command for each element of the collection until the “do_on()” operation returns false. The elements are visited in iteration order(see "The Command and Comparator Interface" on page 119) . Notes: 1. The “do_on()” operation must not remove elements from or add elements to the collection. 2. The “do_on()” operation must not manipulate the element in the collection in a way that changes the positioning property of the element. Returns true if the “do_on()” operation returns true for each element it is applied to.
boolean all_elements_do(
in Command what
);
Returns the number of elements contained in the collection.
unsigned long number_of_elements();
Returns true if the collection is empty.
boolean is_empty();
Destroys the collection. This includes: removing all elements from the collection destroying all iterators created for this collection destroying the instance of Operations passed at creation time to the collection implementation. Notes: 1. Removing of elements in case of objects means removing of object references not destroying of the collected objects. 2. Object references to iterators of the collections become invalid.
void destroy();
Creates and returns an iterator instance for this collection. Which type of iterator actually is created depends on the interface type of this collection. The following table describes which type of iterator is created for which type of concrete collection. After creation the iterator is initialized with the state invalid, that is, “pointing to nothing”. If the given parameter read_only is true the iterator is created with const designation i.e. a trial to modify the collection content via this iterator is rejected and raises the exception IteratorInvalid. Note, collections serve as factories for their iterator instances. An iterator is created in the same address space as the collection for which it is created. An iterator instance can only point to elements of the collection for which it was created.
Iterator create_iterator(
in boolean read_only
);
};
interface EqualityCollection : Collection {
Returns true if the collection contains an element equal to the given element. The given elements must be of the expected type otherwise the exception ElementInvalid is raised.
boolean contains_element(
in any element
)
raises(
ElementInvalid
);
Returns true if all the elements of the given collection are contained in the collection. The definition of containment is given in “contains_element”. The elements in the given collection must be of the expected type otherwise the exception ElementInvalid is raised.
boolean contains_all_from(
in Collection a_collection
)
raises(
ElementInvalid
);
Locates an element in the collection that is equal to the given element. If no such element is found, the element is added as described in add. Returns true if the element was found. Returns false if the element had to be added. The given element must be of the expected type otherwise the exception ElementInvalid is raised. All iterators keep their state.
boolean locate_or_add_element(
in any element
)
raises(
ElementInvalid
);
Locates an element in the collection that is equal to the given element. If no such element is found, the element is added as described in add. The iterator is set to the found or added element. Returns true if the element was found. Returns false if the element had to be added. The given element must be of the expected type otherwise the exception ElementInvalid is raised. The given iterator must belong to the collection, otherwise the exception IteratorInvalid is raised.
boolean locate_or_add_element_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
Locates an element in the collection that is equal to the given element. Sets the iterator to point to the element in the collection, or invalidates the iterator if no such element exists. If the collection, contains several such elements, the first element in iteration order is located. Returns true if an element is found. The iterator must belong to the collection, otherwise the exception IteratorInvalid is raised. All iterators keep their state.
boolean locate_element(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
Locates the next element in iteration order in the collection that is equal to the given element, starting at the element next to the one pointed to by the given iterator. Sets the iterator to point to the located element. The iterator is invalidated if the end of the collection is reached and no more occurrences of the given element are left to be visited. If the iterator is in the state in-between, locating is started at the iterator’s “potential next” element. Returns true if an element was found. The given element must be of the expected type otherwise the exception ElementInvalid is raised. The iterator must belong to the collection and must be valid, otherwise the exception IteratorInvalid is raised.
boolean locate_next_element(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
Locates the next element in iteration order that is different from the element pointed to by the given iterator. If no more elements are left to be visited, the given iterator will no longer be valid. Returns true if the next different element was found. The iterator must belong to the collection and point to an element of the collection, otherwise the exception IteratorInvalid or IteratorInBetween is raised.
boolean locate_next_different_element(
in Iterator an_iterator
)
raises(
IteratorInvalid,
IteratorInBetween
);
Removes an element in the collection that is equal to the given element. If no such element exists, the collection remains unchanged. In collections with nonunique elements, an arbitrary occurrence of the given element will be removed. Returns true if an element was removed. The given element must be of the expected type otherwise the exception ElementInvalid is raised. If an element was removed, all iterators pointing to this element go in-between. All other iterators keep their state.
boolean remove_element(
in any element
)
raises(
ElementInvalid
);
Removes all elements from the collection that are equal to the given element, and returns the number of elements removed. The given element must be of the expected type otherwise the exception ElementInvalid is raised. All iterators pointing to elements removed go in-between. All other iterators keep their state.
unsigned long remove_all_occurances(
in any element
)
raises(
ElementInvalid
);
Returns the number of different elements in the collection.
unsigned long number_of_different_elements();
Returns the number of occurrences of the given element in the collection. The given element must be of the expected type otherwise the exception ElementInvalid is raised.
unsigned long number_of_occurances(
in any element
)
raises(
ElementInvalid
);
};
interface Set : EqualityCollection {
Makes this collection the difference between this collection and the given collection. The difference of A and B (A minus B) is the set of elements that are contained in A but not in B. The same operation is defined for other collections too. The following rule applies for collections with multiple elements: If collection P contains the element X m times and collection Q contains the element X n times, the difference of P and Q contains the element X m-n times if “m > n”, and zero times if “m <= n”. Elements of the given collection must have the expected type of this collection otherwise the exception ElementInvalid is raised. Valid iterators pointing to elements removed go in-between. All other iterators keep their state.
void difference_with(
in Set a_collection
)
raises(
ElementInvalid
);
Creates the difference between the two given collections, and adds this difference to this collection. Elements of the given collections must be of the expected type in this collection otherwise the exception ElementInvalid is raised. Adding the difference takes place one by one so the semantics as for “add” applies here for raised exceptions and iterator state.
void add_difference(
in Set collection1,
in Set collection2
)
raises(
ElementInvalid
);
Makes this collection the intersection of this collection and the given collection. The intersection of A and B is the set of elements that is contained in both A and B. The same operation is defined for other collections, too.The following rule applies for collections with multiple elements: If collection P contains the element X m times and collection Q contains the element X n times, the intersection of P and Q contains the element X “MIN(m,n)” times. Elements of the given collection have to be of the expected type in this collection otherwise the exception ElementInvalid is raised. Valid iterators of this collection pointing to removed elements go in-between.All other iterators keep their state.
void intersection_with(
in Set a_collection
)
raises(
ElementInvalid
);
Creates the intersection of the two given collections, and adds this intersection to this collection. Elements of the given collections must be of the expected type in this collection otherwise the exception ElementInvalid is raised. Adding the intersection takes place one by one so the same semantics as for add applies for and raised exceptions and iterator state.
void add_intersection(
in Set collection1,
in Set collection2
)
raises(
ElementInvalid
);
Makes this collection the union of this collection and the given collection. The union of A and B are the elements that are members of A or B or both. The same operation is defined for other collections too.The following rule applies for collections with multiple elements: If collection P contains the element X m times and collection Q contains the element X n times, the union of P and Q contains the element X m+n times. Elements of the given collection have to be of the expected type in this collection otherwise the exception ElementInvalid is raised. Adding takes place one by one so the semantics for “add” applies here for raised exceptions and iterator state.
void union_with(
in Set a_collection
)
raises(
ElementInvalid
);
Creates the union of the two given collections, and adds this union to this collection. Elements of the given collections have to be of the expected type in this collection otherwise the exception ElementInvalid is raised. Adding the intersection takes place one by one so the semantics for “add” applies here for validity of iterators and raised exceptions.
void add_union(
in Set collection1,
in Set collection2
)
raises(
ElementInvalid
);
Returns true if the given collection is equal to the collection. Elements of the given collections have to be of the expected type in this collection otherwise the exception ElementInvalid is raised. This operation is defined for other collections, too. Two collections are equal if the number of elements in each collection is the same, and if the following conditions depending on the collection properties are fulfilled. collections with unique elements: If the collections have unique elements, any element that occurs in one collection must occur in the other collections, too. collections with non-unique elements: If an element has n occurrences in one collection, it must have exactly n occurrences in the other collection. sequential collections: If they are lexicographically equal based on element equality defined for the elements of the sequential collection.
boolean equal(
in Set a_collection
)
raises(
ElementInvalid
);
Returns true if the given collection is not equal to this collection.
boolean not_equal(
in Set a_collection
)
raises(
ElementInvalid
);
};
interface SetFactory : KosAppService::Version {
Set create(
in Operations ops,
in unsigned long expected_size
);
};
interface EqualityIterator : Iterator {
Locates an element in the collection that is equal to the given element. Sets the iterator to the located element, or invalidates the iterator if no such element exists.If the collection contains several such elements, the first element in iteration order is located. Returns true if an element is found. The element must be of the expected type otherwise the expected ElementInvalid is raised.
boolean set_to_element_with_value(
in any element
);
Locates the next element in iteration order in the collection that is equal to the given element, starting at the element next to the one pointed to by the iterator. Sets the iterator to the located element in the collection. If there is no such element the iterator is invalidated. If the iterator is in the state in-between locating is started at the iterator’s “potential next” element. Returns true if an element was found. The iterator must be valid, otherwise the exception IteratorInvalid is raised. The element must be of the expected type otherwise the exception ElementInvalid is raised.
boolean set_to_next_element_with_value(
in any element
);
Locates the next element in iteration order that is different from the element pointed to. Sets the iterator to he located element, or if no such element exists, the iterator is invalidated. Returns true if the next different element was found. The iterator must be valid and point to an element of the collection, otherwise the exception IteratorInvalid or IteratorInBetween is raised.
boolean set_to_next_element_with_different_value();
};
interface KeyCollection : Collection {
readonly attribute TypeCode key_type;
boolean contains_element_with_key(
in any key
)
raises(
KeyInvalid
);
boolean contains_all_keys_from(
in KeyCollection a_collection
)
raises(
KeyInvalid
);
boolean locate_or_add_element_with_key(
in any element
)
raises(
ElementInvalid
);
boolean locate_or_add_element_with_key_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean add_or_replace_element_with_key(
in any element
)
raises(
ElementInvalid
);
boolean add_or_replace_element_with_key_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean remove_element_with_key(
in any key
)
raises(
KeyInvalid
);
unsigned long remove_all_elements_with_key(
in any key
)
raises(
KeyInvalid
);
boolean replace_element_with_key(
in any element
)
raises(
ElementInvalid
);
boolean replace_element_with_key_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean retrieve_element_with_key(
in any key,
out any element
)
raises(
KeyInvalid
);
void key(
in any element,
out any key
)
raises(
ElementInvalid
);
void keys(
in AnySequence elements,
out AnySequence keys
)
raises(
ElementInvalid
);
boolean locate_element_with_key(
in any key,
in Iterator an_iterator
)
raises(
KeyInvalid,
IteratorInvalid
);
boolean locate_next_element_with_key(
in any key,
in Iterator an_iterator
)
raises(
KeyInvalid,
IteratorInvalid
);
boolean locate_next_element_with_different_key(
in Iterator an_iterator
)
raises(
IteratorInBetween,
IteratorInvalid
);
unsigned long number_of_different_keys();
unsigned long number_of_elements_with_key(
in any key
)
raises(
KeyInvalid
);
};
interface EqualityKeyCollection : EqualityCollection, KeyCollection {
};
interface Map : EqualityKeyCollection {
void difference_with(
in Map a_collection
)
raises(
ElementInvalid
);
void add_difference(
in Map collection1,
in Map collection2
)
raises(
ElementInvalid
);
void intersection_with(
in Map a_collection
);
void add_intersection(
in Map collection1,
in Map collection2
)
raises(
ElementInvalid
);
void union_with(
in Map a_collection
)
raises(
ElementInvalid
);
void add_union(
in Map collection1,
in Map collection2
)
raises(
ElementInvalid
);
boolean equal(
in Map a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in Map a_collection
)
raises(
ElementInvalid
);
};
interface MapFactory {
readonly attribute
KosCollection::Set /* of Map */ Map_role;
Map create(
in Operations ops,
in unsigned long expected_size
);
};
interface OrderedCollection : Collection {
void remove_element_at_position(
in unsigned long position
)
raises(
PositionInvalid
);
void remove_first_element()
raises(
EmptyCollection
);
void remove_last_element()
raises(
EmptyCollection
);
boolean retrieve_element_at_position(
in unsigned long position,
out any element
)
raises(
PositionInvalid
);
boolean retrieve_first_element(
out any element
)
raises(
EmptyCollection
);
boolean retrieve_last_element(
out any element
)
raises(
EmptyCollection
);
OrderedIterator create_ordered_iterator(
in boolean read_only,
in boolean reverse_iteration
);
};
interface SortedCollection : OrderedCollection {
};
interface SequentialCollection : OrderedCollection {
void add_element_as_first(
in any element
)
raises(
ElementInvalid
);
void add_element_as_first_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
void add_element_as_last(
in any element
)
raises(
ElementInvalid
);
void add_element_as_last_set_iterator(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
void add_element_as_next(
in any element,
in Iterator where
)
raises(
ElementInvalid,
IteratorInvalid
);
void add_element_as_previous(
in any element,
in Iterator where
)
raises(
ElementInvalid,
IteratorInvalid
);
void add_element_at_position(
in unsigned long position,
in any element
)
raises(
PositionInvalid,
ElementInvalid
);
void add_element_at_position_set_iterator(
in unsigned long position,
in any element,
in Iterator an_iterator
)
raises(
PositionInvalid,
ElementInvalid,
IteratorInvalid
);
void replace_element_at_position(
in unsigned long position,
in any element
)
raises(
PositionInvalid,
ElementInvalid
);
void replace_first_element(
in any element
)
raises(
ElementInvalid,
EmptyCollection
);
void replace_last_element(
in any element
)
raises(
ElementInvalid,
EmptyCollection
);
void sort(
in Comparator a_comparator
);
void reverse();
};
interface KeySortedCollection : SortedCollection, KeyCollection {
boolean locate_first_element_with_key(
in any key,
in Iterator an_iterator
)
raises(
KeyInvalid,
IteratorInvalid
);
boolean locate_last_element_with_key(
in any key,
in Iterator an_iterator
)
raises(
KeyInvalid,
IteratorInvalid
);
boolean locate_previous_element_with_key(
in any key,
in Iterator an_iterator
)
raises(
KeyInvalid,
IteratorInvalid
);
boolean locate_previous_element_with_different_key(
in Iterator an_iterator
)
raises(
IteratorInBetween,
IteratorInvalid
);
};
interface EqualitySortedCollection : EqualityCollection, SortedCollection {
boolean locate_first_element(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean locate_last_element(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean locate_previous_element(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean locate_previous_different_element(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
};
interface EqualitySequentialCollection : SequentialCollection, EqualityCollection {
boolean locate_first_element_with_value(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean locate_last_element_with_value(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
boolean locate_previous_element_with_value(
in any element,
in Iterator an_iterator
)
raises(
ElementInvalid,
IteratorInvalid
);
};
interface EqualityKeySortedCollection : EqualitySortedCollection, KeySortedCollection, EqualityKeyCollection {
};
interface KeySet : KeyCollection {
};
interface KeyBag : KeyCollection {
};
interface Relation : EqualityKeyCollection {
void difference_with(
in Relation a_collection
)
raises(
ElementInvalid
);
void add_difference(
in Relation collection1,
in Relation collection2
)
raises(
ElementInvalid
);
void intersection_with(
in Relation a_collection
);
void add_intersection(
in Relation collection1,
in Relation collection2
)
raises(
ElementInvalid
);
void union_with(
in Relation a_collection
)
raises(
ElementInvalid
);
void add_union(
in Relation collection1,
in Relation collection2
)
raises(
ElementInvalid
);
boolean equal(
in Relation a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in Relation a_collection
)
raises(
ElementInvalid
);
};
interface Bag : EqualityCollection {
void difference_with(
in Bag a_collection
)
raises(
ElementInvalid
);
void add_difference(
in Bag collection1,
in Bag collection2
)
raises(
ElementInvalid
);
void intersection_with(
in Bag a_collection
);
void add_intersection(
in Bag collection1,
in Bag collection2
)
raises(
ElementInvalid
);
void union_with(
in Bag a_collection
)
raises(
ElementInvalid
);
void add_union(
in Bag collection1,
in Bag collection2
)
raises(
ElementInvalid
);
boolean equal(
in Bag a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in Bag a_collection
)
raises(
ElementInvalid
);
};
interface KeySortedSet : KeySortedCollection {
long compare(
in KeySortedSet a_collection,
in Comparator a_comparator
);
};
interface KeySortedBag : KeySortedCollection {
long compare(
in KeySortedBag collection,
in Comparator a_comparator
);
};
interface SortedMap : EqualityKeySortedCollection {
void difference_with(
in SortedMap a_collection
)
raises(
ElementInvalid
);
void add_difference(
in SortedMap collection1,
in SortedMap collection2
)
raises(
ElementInvalid
);
void intersection_with(
in SortedMap a_collection
)
raises(
ElementInvalid
);
void add_intersection(
in SortedMap collection1,
in SortedMap collection2
)
raises(
ElementInvalid
);
void union_with(
in SortedMap a_collection
)
raises(
ElementInvalid
);
void add_union(
in SortedMap collection1,
in SortedMap collection2
)
raises(
ElementInvalid
);
boolean equal(
in SortedMap a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in SortedMap a_collection
)
raises(
ElementInvalid
);
long compare(
in SortedMap a_collection,
in Comparator a_comparator
);
};
interface SortedRelation : EqualityKeySortedCollection {
void difference_with(
in SortedRelation a_collection
)
raises(
ElementInvalid
);
void add_difference(
in SortedRelation collection1,
in SortedRelation collection2
)
raises(
ElementInvalid
);
void intersection_with(
in SortedRelation a_collection
)
raises(
ElementInvalid
);
void add_intersection(
in SortedRelation collection1,
in SortedRelation collection2
)
raises(
ElementInvalid
);
void union_with(
in SortedRelation a_collection
)
raises(
ElementInvalid
);
void add_union(
in SortedRelation collection1,
in SortedRelation collection2
)
raises(
ElementInvalid
);
boolean equal(
in SortedRelation a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in SortedRelation a_collection
)
raises(
ElementInvalid
);
long compare(
in SortedRelation a_collection,
in Comparator a_comparator
);
};
interface SortedSet : EqualitySortedCollection {
void difference_with(
in SortedSet a_collection
)
raises(
ElementInvalid
);
void add_difference(
in SortedSet collection1,
in SortedSet collection2
)
raises(
ElementInvalid
);
void intersection_with(
in SortedSet a_collection
)
raises(
ElementInvalid
);
void add_intersection(
in SortedSet collection1,
in SortedSet collection2
)
raises(
ElementInvalid
);
void union_with(
in SortedSet a_collection
)
raises(
ElementInvalid
);
void add_union(
in SortedSet collection1,
in SortedSet collection2
)
raises(
ElementInvalid
);
boolean equal(
in SortedSet a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in SortedSet a_collection
)
raises(
ElementInvalid
);
long compare(
in SortedSet a_collection,
in Comparator a_comparator
);
};
interface SortedBag : EqualitySortedCollection {
void difference_with(
in SortedBag a_collection
)
raises(
ElementInvalid
);
void add_difference(
in SortedBag collection1,
in SortedBag collection2
)
raises(
ElementInvalid
);
void intersection_with(
in SortedBag a_collection
)
raises(
ElementInvalid
);
void add_intersection(
in SortedBag collection1,
in SortedBag collection2
)
raises(
ElementInvalid
);
void union_with(
in SortedBag a_collection
)
raises(
ElementInvalid
);
void add_union(
in SortedBag collection1,
in SortedBag collection2
)
raises(
ElementInvalid
);
boolean equal(
in SortedBag a_collection
)
raises(
ElementInvalid
);
boolean not_equal(
in SortedBag a_collection
)
raises(
ElementInvalid
);
long compare(
in SortedBag a_collection,
in Comparator a_comparator
);
};
interface EqualitySequence : EqualitySequentialCollection {
boolean equal(
in EqualitySequence a_collection
);
boolean not_equal(
in EqualitySequence a_collection
);
long compare(
in EqualitySequence a_collection,
in Comparator a_comparator
);
};
interface Sequence : SequentialCollection {
long compare(
in Sequence a_collection,
in Comparator a_comparator
);
};
interface Heap : Collection {
};
interface OrderedIterator : Iterator {
boolean set_to_last_element();
boolean set_to_previous_element()
raises(
IteratorInvalid
);
boolean set_to_nth_previous_element(
in unsigned long n
)
raises(
IteratorInvalid
);
void set_to_position(
in unsigned long position
)
raises(
PositionInvalid
);
unsigned long position()
raises(
IteratorInvalid
);
boolean retrieve_element_set_to_previous(
out any element,
out boolean more
)
raises(
IteratorInvalid,
IteratorInBetween
);
boolean retrieve_previous_n_elements(
in unsigned long n,
out AnySequence result,
out boolean more
)
raises(
IteratorInvalid,
IteratorInBetween
);
boolean not_equal_retrieve_element_set_to_previous(
in Iterator test,
out any element
)
raises(
IteratorInvalid,
IteratorInBetween
);
boolean remove_element_set_to_previous()
raises(
IteratorInvalid,
IteratorInBetween
);
boolean remove_previous_n_elements(
in unsigned long n,
out unsigned long actual_number
)
raises(
IteratorInvalid,
IteratorInBetween
);
boolean not_equal_remove_element_set_to_previous(
in Iterator test
)
raises(
IteratorInvalid,
IteratorInBetween
);
boolean replace_element_set_to_previous(
in any element
)
raises(
IteratorInvalid,
IteratorInBetween,
ElementInvalid
);
boolean replace_previous_n_elements(
in AnySequence elements,
out unsigned long actual_number
)
raises(
IteratorInvalid,
IteratorInBetween,
ElementInvalid
);
boolean boolean_not_equal_replace_element_set_to_previous(
in Iterator test,
in any element
)
raises(
IteratorInvalid,
IteratorInBetween,
ElementInvalid
);
boolean is_first();
boolean is_last();
boolean is_for_same(
in Iterator an_iterator
);
boolean is_reverse();
};
interface KeyIterator : Iterator {
boolean set_to_element_with_key(
in any key
)
raises(
KeyInvalid
);
boolean set_to_next_element_with_key(
in any key
)
raises(
IteratorInvalid,
KeyInvalid
);
boolean set_to_next_element_with_different_key()
raises(
IteratorInBetween,
IteratorInvalid
);
boolean retrieve_key(
out any key
)
raises(
IteratorInBetween,
IteratorInvalid
);
boolean retrieve_next_n_keys(
out AnySequence keys
)
raises(
IteratorInBetween,
IteratorInvalid
);
};
interface SortedIterator : OrderedIterator {
};
interface SequentialIterator : OrderedIterator {
boolean add_element_as_next_set_iterator(
in any element
)
raises(
IteratorInvalid,
ElementInvalid
);
void add_n_elements_as_next_set_iterator(
in AnySequence elements
)
raises(
IteratorInvalid,
ElementInvalid
);
boolean add_element_as_previous_set_iterator(
in any element
)
raises(
IteratorInvalid,
ElementInvalid
);
void add_n_elements_as_previous_set_iterator(
in AnySequence elements
)
raises(
IteratorInvalid,
ElementInvalid
);
};
interface EqualityKeyIterator : KeyIterator, EqualityIterator {
};
interface KeySortedIterator : KeyIterator, SortedIterator {
boolean set_to_first_element_with_key(
in any key,
in LowerBoundStyle stype
)
raises(
KeyInvalid
);
boolean set_to_last_element_with_key(
in any key,
in UpperBoundStyle style
)
raises(
KeyInvalid
);
boolean set_to_previous_element_with_key(
in any key
)
raises(
IteratorInvalid,
KeyInvalid
);
boolean set_to_previous_element_with_different_key()
raises(
IteratorInBetween,
IteratorInvalid
);
boolean retrieve_previous_n_keys(
out AnySequence keys
)
raises(
IteratorInBetween,
IteratorInvalid
);
};
interface EqualitySortedIterator : SortedIterator, EqualityIterator {
};
interface EqualitySequentialIterator : SequentialIterator, EqualityIterator {
boolean set_to_first_element_with_value(
in any element
)
raises(
ElementInvalid
);
boolean set_to_last_element_with_value(
in any element
)
raises(
ElementInvalid
);
boolean set_to_previous_element_with_value(
in any element
)
raises(
ElementInvalid
);
};
interface EqualityKeySortedIterator : EqualityKeyIterator, KeySortedIterator, EqualitySortedIterator {
};
interface CollectionFactory {
readonly attribute Collection Collection_role;
Collection create(
in ParameterList parameters
)
raises(
ParameterInvalid
);
};
interface CollectionFactories {
boolean add_factory(
in Istring collection_interface,
in Istring impl_category,
in Istring impl_interface,
in CollectionFactory factory
);
boolean remove_factory(
in Istring collection_interface,
in Istring impl_category,
in Istring impl_interface
);
};
interface KeySetFactory {
readonly attribute KeySet KeySet_role;
KeySet create(
in Operations ops,
in unsigned long expected_size
);
};
interface KeyBagFactory {
readonly attribute KeyBag KeyBag_role;
KeyBag create(
in Operations ops,
in unsigned long expected_size
);
};
interface RelationFactory {
readonly attribute Relation Relation_role;
Relation create(
in Operations ops,
in unsigned long expected_size
);
};
interface BagFactory {
readonly attribute Bag Bag_role;
Bag create(
in Operations ops,
in unsigned long expected_size
);
};
interface KeySortedSetFactory {
readonly attribute
KeySortedSet KeySortedSet_role;
KeySortedSet create(
in Operations ops,
in unsigned long expected_size
);
};
interface KeySortedBagFactory {
readonly attribute
KeySortedBag KeySortedBag_role;
KeySortedBag create(
in Operations ops,
in unsigned long expected_size
);
};
interface SortedMapFactory {
readonly attribute SortedMap SortedMap_role;
SortedMap create(
in Operations ops,
in unsigned long expected_size
);
};
interface SortedRelationFactory {
readonly attribute
SortedRelation SortedRelation_role;
SortedRelation create(
in Operations ops,
in unsigned long expected_size
);
};
interface SortedSetFactory {
readonly attribute SortedSet SortedSet_role;
SortedSet create(
in Operations ops,
in unsigned long expected_size
);
};
interface SortedBagFactory {
readonly attribute SortedBag SortedBag_role;
SortedBag create(
in Operations ops,
in unsigned long expected_size
);
};
interface SequenceFactory {
readonly attribute Sequence Sequence_role;
Sequence create(
in Operations ops,
in unsigned long expected_size
);
};
interface EqualitySequenceFactory {
readonly attribute
EqualitySequence EqualitySequence_role;
EqualitySequence create(
in Operations ops,
in unsigned long expected_size
);
};
interface HeapFactory {
readonly attribute Heap Heap_role;
Heap create(
in Operations ops,
in unsigned long expected_size
);
};
interface RestrictedAccessCollection {
boolean unfilled();
unsigned long size();
void purge();
};
interface Queue : RestrictedAccessCollection {
void enqueue(
in any element
)
raises(
ElementInvalid
);
void dequeue()
raises(
EmptyCollection
);
boolean element_dequeue(
out any element
)
raises(
EmptyCollection
);
};
interface QueueFactory {
readonly attribute Queue Queue_role;
Queue create(
in Operations ops,
in unsigned long expected_size
);
};
interface Deque : RestrictedAccessCollection {
void enqueue_as_first(
in any element
)
raises(
ElementInvalid
);
void enqueue_as_last(
in any element
)
raises(
ElementInvalid
);
void dequeue_first()
raises(
EmptyCollection
);
boolean element_dequeue_first(
out any element
)
raises(
EmptyCollection
);
void dequeue_last()
raises(
EmptyCollection
);
boolean element_dequeue_last(
out any element
)
raises(
EmptyCollection
);
};
interface DequeFactory {
readonly attribute Deque Deque_role;
Deque create(
in Operations ops,
in unsigned long expected_size
);
};
interface Stack : RestrictedAccessCollection {
void push(
in any element
)
raises(
ElementInvalid
);
void pop()
raises(
EmptyCollection
);
boolean element_pop(
out any element
)
raises(
EmptyCollection
);
boolean top(
out any element
)
raises(
EmptyCollection
);
};
interface StackFactory {
readonly attribute Stack Stack_role;
Stack create(
in Operations ops,
in unsigned long expected_size
);
};
interface PriorityQueue : RestrictedAccessCollection {
void enqueue(
in any element
)
raises(
ElementInvalid
);
void dequeue()
raises(
EmptyCollection
);
boolean element_dequeue(
out any element
)
raises(
EmptyCollection
);
};
interface PriorityQueueFactory {
readonly attribute
PriorityQueue PriorityQueue_role;
PriorityQueue create(
in Operations ops,
in unsigned long expected_size
);
};
interface Comparator {
long compare(
in any element1,
in any element2
);
};
const string SetFactoryName = "KosSetFactory";
};