Namespace: OpenEdge.Core.Collections
Class
Set
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object
Implements: OpenEdge.Core.Collections.ISet

Copyright (c) 2013,2014,2017-2018,2021-2022 by Progress Software Corporation. All rights reserved.
File:Set
Purpose:A collection that contains no duplicate elements.
Author(s):hdaniels
Created:Wed Jan 09 10:45:45 EST 2008
Notes:* As of 12.6, this class wraps a List<Object>
/* The holder of the list data




Method Summary
Options Name Purpose
LOGICAL Add (Object) /** Appends the specified element to the set if not already present @param Object The element to add to the collection @return logical True if the operation succeeded. */
LOGICAL AddAll (ICollection) /** Adds all of the input collection to the current list. Items from the input collection as added to the END of the current list. To prepend items, call AddAll(1, ICollection) @param OpenEdge.Core.Collections.ICollection The collection to add. @return logical TRUE if items were added (ie the input collection has at least one item) */
LOGICAL AddArray (Object[]) /** Adds an array of elements to the collection @param Object[] An array of elements to add to the collection @return logical True if the operation succeeded. */
Clear () /** Removes all of the elements from this list */
LOGICAL Contains (Object) /** Check whether the collection contains at least one object that matches the passed in object. @param Object The object @return logical Returns true if the object is in the collection */
LOGICAL ContainsAll (ICollection) /** Returns true if this list contains all of the elements of the specified collection. @param OpenEdge.Core.Collections.ICollection The collection of obejcts to check @return logical True if all the elements match */
LOGICAL Equals (Object) /* Equals if and only if Set and every member of the specified set is contained in this set @param Object The object to compare @param logical TRUE if the object to compare is equal */
LOGICAL IsEmpty () /** Indicates whether this collection has any elements. @return logical True if the collection is empty. */
OpenEdge.Core.Collections.IIterator Iterator () /* Returns a new IIterator over the collection. @return OpenEdge.Core.Collections.IIterator An iterator for this list */
LOGICAL Remove (Object) /** Removes the occurrence in this Set of the specified element @param Object The object to remove @return logical True if the operation succeded. */
LOGICAL RemoveAll (ICollection) /** Removes from this Set all the elements that are contained in the specified collection (optional operation). @param OpenEdge.Core.Collections.ICollection The collection to remove. @return logical True if the operation succeeded. */
LOGICAL RetainAll (ICollection) /** Retains only the elements in this Set that are contained in the specified collection (optional operation). This method creates a UNION of the input collection and this Set. @param OpenEdge.Core.Collections.ICollection The collection to retain @return Logical True if the object changed */
Progress.Lang.Object ToArray () /** Returns the contents of the collection as an array of objects. @return Object[] The collection returnes as an object array */
ToTable (table-handle) /** Returns the contents of the collection as temp-table. This is a shallow copy of the collection - basically a new set of references is created. @param output table-handle The collection as a temp-table */

Constructor Summary
Options Name Purpose
Set () /* Default constructor */
Set (ISet) /* Constructor @param ISet Initial set */

Property Summary
Options Name Purpose
INTEGER Size


Method Detail
Top

LOGICAL Add (Object)

Purpose: Appends the specified element to the set if not already present
Parameters:
obj Progress.Lang.Object
Returns LOGICAL
logical True if the operation succeeded.
Top

LOGICAL AddAll (ICollection)

Purpose: Adds all of the input collection to the current list.
Items from the input collection as added to the END of
the current list.
To prepend items, call AddAll(1, ICollection)
Parameters:
collection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
logical TRUE if items were added (ie the input collection has at least one item)
Top

LOGICAL AddArray (Object[])

Purpose: Adds an array of elements to the collection
Parameters:
poElements Progress.Lang.Object
Returns LOGICAL
logical True if the operation succeeded.
Top

Clear ()

Purpose: Removes all of the elements from this list
Top

LOGICAL Contains (Object)

Purpose: Check whether the collection contains at least one object
that matches the passed in object.
Parameters:
checkObject Progress.Lang.Object
Returns LOGICAL
logical Returns true if the object is in the collection
Top

LOGICAL ContainsAll (ICollection)

Purpose: Returns true if this list contains all of the elements of the
specified collection.
Parameters:
poCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
logical True if all the elements match
Top

LOGICAL Equals (Object)

/* Equals if and only if Set and every member of the specified set is contained in this set
Parameters:
o Progress.Lang.Object
Returns LOGICAL
Top

LOGICAL IsEmpty ()

Purpose: Indicates whether this collection has any elements.
Returns LOGICAL
logical True if the collection is empty.
Top

OpenEdge.Core.Collections.IIterator Iterator ()

/* Returns a new IIterator over the collection.
Returns OpenEdge.Core.Collections.IIterator
OpenEdge.Core.Collections.IIterator An iterator for this list
Top

LOGICAL Remove (Object)

Purpose: Removes the occurrence in this Set of the specified element
Parameters:
poElement Progress.Lang.Object
Returns LOGICAL
logical True if the operation succeded.
Top

LOGICAL RemoveAll (ICollection)

Purpose: Removes from this Set all the elements that are contained in the
specified collection (optional operation).
Parameters:
collection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
logical True if the operation succeeded.
Top

LOGICAL RetainAll (ICollection)

Purpose: Retains only the elements in this Set that are contained in the
specified collection (optional operation).
This method creates a UNION of the input collection and this Set.
Parameters:
poCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
Logical True if the object changed
Top

Progress.Lang.Object ToArray ()

Purpose: Returns the contents of the collection as an array of objects.
Returns Progress.Lang.Object
Object[] The collection returnes as an object array
Top

ToTable (table-handle)

Purpose: Returns the contents of the collection as temp-table. This is a shallow
copy of the collection - basically a new set of references is created.
Parameters:
tt TABLE-HANDLE


Constructor Detail
Top

Set ()

/* Default constructor
Top

Set (ISet)

/* Constructor
Parameters:
copyset OpenEdge.Core.Collections.ISet


Property Detail
Top

INTEGER Size

Returns INTEGER


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.6.0