Base interface for mutable sets that store their elements in order.
interface
|
ISortedSet
|
with
|
<T>
|
||
extends
|
IBag<T>
|
||||
ISortedSetConst<T>
|
|||||
base of
|
SortedSetBase
|
The number of elements in this collection.
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of elements. | |
inherited
|
IBagConst.Count
|
Returns the maximum element of this set.
property
|
Maximum
{
get
}
|
||
type
|
T
|
||
value
|
The maximum element. | ||
inherited
|
ISortedSetConst.Maximum
|
Returns the minimum element of this set.
property
|
Minimum
{
get
}
|
||
type
|
T
|
||
value
|
The minimum element. | ||
inherited
|
ISortedSetConst.Minimum
|
Adds the given element to this collection.
method
|
Add
(T element)
|
||
type
|
bool
|
||
params
|
element
|
The element to add. | |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
ICollector.Add
|
Remarks:
Implementing
methods
shall
return
false
iff
the
element
has
already
been
collected,
i.e.
it
is
contained
in
the
collection.
If
in
doubt,
return
true
.
Adds the given elements to this collection.
method
|
AddAll
(IEnumerable<T> elements)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements to add. |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
IBag.AddAll
|
Adds the given elements to this collection.
method
|
AddAll
(T[] elements,
int32 first = 0,
int32 count = -1)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements to add. |
first
|
[>=0]
|
Index of first element to add. | |
count
|
[>=-1]
|
Number
of
elements
to
add.
If
-1
all
elements
from
first
to
the
last
element
are
added.
|
|
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
IBag.AddAll
|
Removes all elements from this collection.
method
|
Clear
()
|
||
inherited
|
IBag.Clear
|
Returns if this collection contains the given element.
[Pure]
|
||||
method
|
Contains
(T element)
|
|||
type
|
bool
|
|||
params
|
element
|
The element. | ||
returns
|
true
if
element
is
contained
in
this
collection,
false
if
not.
|
|||
inherited
|
IBagConst.Contains
|
Returns if this collection contains all given elements.
method
|
ContainsAll
(IEnumerable<T> elements)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements. |
returns
|
true
if
all
elements
are
contained
in
this
collection,
false
if
not.
|
||
inherited
|
IBagConst.ContainsAll
|
Counts the values in this set that lie within the given range.
method
|
CountValuesInRange
(T from,
T to)
|
||
type
|
int32
|
||
params
|
from
|
Start of range, inclusive. | |
to
|
End of range, exclusive. | ||
returns
|
|
The values in the range. |
Returns the first enumerated value.
[Pure]
|
||||
method
|
First
()
|
|||
type
|
T
|
|||
returns
|
The first enumerated value. | |||
inherited
|
IBagConst.First
|
Exceptions:
method
|
GetEnumerator
()
|
||
type
|
IEnumerator<T>
|
||
inherited
|
IEnumerable.GetEnumerator
|
Returns the values in this set that lie within the given range.
method
|
GetValuesInRange
(T from,
T to)
|
||
type
|
T[]
|
||
params
|
from
|
Start of range, inclusive. | |
to
|
End of range, exclusive. | ||
returns
|
|
The number of values in the given range. |
Returns the last enumerated value.
[Pure]
|
||||
method
|
Last
()
|
|||
type
|
T
|
|||
returns
|
The last enumerated value. | |||
inherited
|
IBagConst.Last
|
Exceptions:
Removes the given element from this collection.
method
|
Remove
(T element)
|
||
type
|
bool
|
||
params
|
element
|
The element to remove. | |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
IBag.Remove
|
Removes the given elements from this collection.
method
|
RemoveAll
(IEnumerable<T> elements)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements to remove. |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
IBag.RemoveAll
|
Removes the maximum element from this set.
method
|
RemoveMaximum
()
|
||
type
|
T
|
||
returns
|
The removed element. |
Removes the minimum element from this set.
method
|
RemoveMinimum
()
|
||
type
|
T
|
||
returns
|
The removed element. |
Removes
all
elements
from
this
collection
for
which
the
given
predicate
evaluates
to
true
.
method
|
RemoveWhere
(PredicateDelegate<T> predicate)
|
||
type
|
bool
|
||
params
|
predicate
|
[not-null]
|
The predicate to use. |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
IBag.RemoveWhere
|
Returns the elements of this enumerable object as a fresh array.
[Pure]
|
||||
method
|
ToArray
()
|
|||
type
|
T[]
|
|||
returns
|
|
The array of elements. | ||
inherited
|
IBagConst.ToArray
|
Returns the elements of this collection as an array.
method
|
ToArrayCopy
(T[] array,
int32 offset = 0)
|
||
type
|
T[]
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Offset
into
array.
Defaults
to
0 .
|
|
returns
|
|
The filled array. | |
inherited
|
IBagConst.ToArrayCopy
|
Remarks:
The elements in this collection will be copied into the given array, starting at the array index specified by offset.
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
method
|
ToArrayList
()
|
|||
type
|
IArrayVector<T>
|
|||
returns
|
|
The list of elements. | ||
inherited
|
IBagConst.ToArrayList
|
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
method
|
ToList
()
|
|||
type
|
IVectorConst<T>
|
|||
returns
|
|
The list of elements. | ||
inherited
|
IBagConst.ToList
|