Equals

All the collection implementations override the Progress.Lang.Object Equals() method to return TRUE if the specified objects:

  • Have the same class type
  • Have the same number of elements, and every element contained in one object is contained in the other object

This ensures that collections that are different class instances or contain different class instances are still seen as equal when they represent the same underlying data.

Specialized collections, general iterator

Many methods (Get(), Find()) of the collection objects are specialized in that they return the actual entity interface they support, allowing you to retrieve the objects without casting.

However, there are no specialized iterators in the collections. All collections support the same OpenEdge.DataAdmin.Lang.Collections.IIterator with a Next() method that returns a Progress.Lang.Object. So, you must cast the objects returned from a collection with this iterator to the appropriate interface for processing. For more information, see IIterator interface.

Find() and CanFind()

Most of the collection classes implement the Find() and CanFind() methods, which take a character and/or integer value as input. These are convenience methods that allow you to return an object from the collection, or check if one exists in the collection, based on a property value. The methods typically use unique identifiers like the Name and/or Id property.