Method Choose
Choose()
Choose some item of this collection.
Implementations must assure that the item returned may be efficiently removed.
Implementors may decide to implement this method in a way such that repeated calls do not necessarily give the same result, i.e. so that the result of the following test is undetermined:
coll.Choose() == coll.Choose()
Declaration
T Choose()
Returns
Type | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
NoSuchItemException | if collection is empty. |