Platforms to show: All Mac Windows Linux Cross-Platform

Back to IntegerOrderedSetMBS class.

IntegerOrderedSetMBS.Clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases all of the elements.

IntegerOrderedSetMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The default constructor.

See also:

IntegerOrderedSetMBS.Constructor(Keys() as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new set from the values in the array.

If the array has duplicates, the later elements overwrite the earlier keys.

See also:

IntegerOrderedSetMBS.CountKey(key as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Counts how often a key is used in this set.

IntegerOrderedSetMBS.find(key as Integer) as IntegerOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds the key and returns an interator.

Returns the same value as the last method if the item was not found.

IntegerOrderedSetMBS.first as IntegerOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator pointing to the beginning of the set.
Example
// Create a map
dim m as new IntegerOrderedSetMBS

m.insert(1)
m.insert(2)
m.insert(3)

// get iterators pointing to first and after last element
dim i as IntegerOrderedSetIteratorMBS = m.first
dim e as IntegerOrderedSetIteratorMBS = m.last

// Show all keys and values
while i.isNotEqual(e)
MsgBox str(i.Key)
i.MoveNext
wend

IntegerOrderedSetMBS.insert(key as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a value to the set.

IntegerOrderedSetMBS.Key(index as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value of key for the Indexth sequential item.

If there is no Indexth item in the map, a call generates an OutOfBoundsException error. The first item has the index zero.

IntegerOrderedSetMBS.Keys as Integer()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns all the keys as an array.
Example
dim m as new IntegerOrderedSetMBS

m.insert(1)
m.insert(2)

for each v as Integer in m.Keys
MsgBox str(v)
next

The order is stable and matches the order returned by the Values method at least until the Dictionary is modified. Use this method with For Each to loop through all the keys.

IntegerOrderedSetMBS.last as IntegerOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator pointing to the end of the set.
Example
// Create a map
dim m as new IntegerOrderedSetMBS

m.insert(1)
m.insert(2)
m.insert(3)

// get iterators pointing to first and after last element
dim i as IntegerOrderedSetIteratorMBS = m.first
dim e as IntegerOrderedSetIteratorMBS = m.last

// Show all keys and values
while i.isNotEqual(e)
MsgBox str(i.Key)
i.MoveNext
wend

IntegerOrderedSetMBS.lookup(key as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks whether an element with the given key exists in this set.
Example
dim set as new IntegerOrderedSetMBS

set.insert 1
set.insert 2

MsgBox str(set.lookup(3)) // shows false as value is missing
MsgBox str(set.lookup(1)) // shows true as value is found

Returns true if yes and false if no.

IntegerOrderedSetMBS.LowerBound(key as Integer) as IntegerOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator for the first element whose key is not less than k.

IntegerOrderedSetMBS.Remove(first as IntegerOrderedSetIteratorMBS, last as IntegerOrderedSetIteratorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases all elements in a range.

See also:

IntegerOrderedSetMBS.Remove(key as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases the element with the given key.

See also:

IntegerOrderedSetMBS.Remove(pos as IntegerOrderedSetIteratorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases the element pointed to by the pos iterator.

See also:

IntegerOrderedSetMBS.UpperBound(key as Integer) as IntegerOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator for the first element whose key is greater than k.

The items on this page are in the following plugins: MBS DataTypes Plugin.


The biggest plugin in space...