CoreClasses Xojo Plugin

ObjectCollection Class (console safe)

ObjectCollection is a high speed collection class, that uses hash tables to maximise performance.

This class has the benefits of the Xojo Collection but the speed close to a dictionary.

This class supports Xojo’s For each syntax when on Xojo 2019r2 or later.

Object
   ObjectCollection

class ObjectCollection implements

IArrayReader

IIterator

Iterable

Iterator

Constructors

ObjectCollectionThe default constructor for the ObjectCollection class.
ObjectCollectionA Constructor to construct a ObjectCollection with non distinct keys.

Properties

LastErrorUse this property to get the Last error code generated by the collection. (Description of each possible error code is listed with each method in the class that can generate a error).

Methods

AddUse this method to add a object to the collection using object as a key.
AddUse this method to add a object to the collection using string as a key.
ClearUse this method to clear all items from the collection.
ClearErrorUse this method to clear the last error.
CountUse this function to get the number of items in the collection.
ExistsUse this function to check for existence of a object key in the collection.
ExistsUse this function to check for existence of a string key in the collection.
GetAtUse this function to read a item from the collection by index.
GetItemKeyUse this function to get a string key for a element specified by index.
GetItemObjectKeyUse this function to get a object key for a element specified by index.
GetKeySetUse this method to get a set of elements with the same object key when the collection is in multikey mode.
GetKeySetUse this method to get a set of elements with the same string key when the collection is in multikey mode.
GetNextUse this function to get next item from the ObjectCollection.
HasNextUse this function to get info if there are more items in the ObjectCollection.
IndexOfReturns a index of a element in the collection.
InsertUse this method to insert a object to the collection using object as a key to a specific location in the collection.
InsertUse this method to insert a object to the collection using string as a key to a specific location in the collection.
ItemUse this setter/getter function to get or set element by index.
ItemUse this setter/getter function to get or set element by a object key.
ItemUse this setter/getter function to get or set element by a string key.
MoveFirstUse this method to reset the iterator in the ObjectCollection.
Operator_SubscriptImplements operator to read from the collection with the ( ) indexer operator. This variation fetches a item by a integer index.
Operator_SubscriptImplements operator to write to the collection with the ( ) indexer operator. This variation sets a item by a integer index.
Operator_SubscriptImplements operator to read from the collection with the ( ) indexer operator. This variation fetches a item by a object key.
Operator_SubscriptImplements operator to write to the collection with the ( ) indexer operator. This variation sets a item by a object key.
Operator_SubscriptImplements operator to read from the collection with the ( ) indexer operator. This variation fetches a item by a string key.
Operator_SubscriptImplements operator to write to the collection with the ( ) indexer operator. This variation sets a item by a string key.
PeekNextUse this function to peek at next item from the ObjectCollection without iterating to next item.
RemoveUse this method to add remove object from the collection by a given index.
RemoveUse this method to add remove object from the collection by a given object key.
RemoveUse this method to add remove object from the collection by a given string key.
SortUse this method to sort the collection.

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS