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

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

Copyright (c) 2013, 2016-2019, 2021-2022 by Progress Software Corporation. All rights reserved.
File:List
Purpose:An ordered collection of elements.
Author(s):hdaniels
Created:Wed Jan 09 10:45:45 EST 2008
Notes:* As of 12.5, this class acts as a wrapper around the built-in List<>
generic types.
this List cannot have unknown values added - though they can be Set()
/* The holder of the list data




Method Summary
Options Name Purpose
LOGICAL Add (integer, Object) /** Inserts the specified element at the specified position in this list. @param integer The position at which to insert the object @param Object The object to add @return Logical Returns true if the operation succeeded @throws Progress.Lang.SysError(18193) */
LOGICAL Add (Object) /** Appends the specified element to list if not already present @param Object The element to add to the collection @return logical True if the operation succeeded. */
LOGICAL AddAll (integer, ICollection) /** Adds all of the input collection to the current list, starting at the index given (ie the index passed is the first item) @param integer The index from which to add. Must be non-zero and positive @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 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 (integer, 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. */
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) /* Two Lists are defined to be equal if they are the same size and all of the elements in this collection are in the to-compare List and in the same sequence. @param P.L.Object @return logical TRUE if the Lists are equal. FALSE otherwise */
Progress.Lang.Object Get (integer) /* Returns the object represented by the index @param integer The sequence to find. Must be positive and <= the Size. @return Object The object represented by the sequence. May be ? */
INTEGER IndexOf (Object) /** Returns the index in this list of the first occurrence of the specified element, or 0 if this list does not contain this element. @param Object The object to check. @return integer The index of the passed-in object */
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 */
INTEGER LastIndexOf (Object) /** Returns the index in this list of the last occurrence of the specified element, or 0 if this list does not contain this element. @param Object The object to check @return integer The index of the last occurrence of the object */
OpenEdge.Core.Collections.IListIterator ListIterator () /* Returns a new IListIterator over the collection. @return OpenEdge.Core.Collections.IListIterator An iterator for this list */
OpenEdge.Core.Collections.IListIterator ListIterator (integer) /** Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. @param integer The starting position for the new iterator @return IListIterator The ordered iterator */
Progress.Lang.Object Remove (integer) /** Removes an item at the given index @param integer The index to remove. Must be between 1 and the size of the List @return Progress.Lang.Object The item that was removed. @throws Progress.Lang.SysError(18193) */
LOGICAL Remove (Object) /** Removes the first occurrence in this list of the specified element @param Object The @return logical True if the operation succeded. */
LOGICAL RemoveAll (ICollection) /** Removes from this list 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 list that are contained in the specified collection (optional operation). @param OpenEdge.Core.Collections.ICollection The collection to retain @return Logical True if the object changed */
Progress.Lang.Object Set (integer, Object) /** Replaces the element at the specified position in this list with the specified element @param integer The position to add @param Object The object to add to the List @return Object The object that was replaced/removed from the List @throws Progress.Lang.SysError(18193) */
OpenEdge.Core.Collections.IList SubList (integer, integer) /* Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. The fromIndex value must be positive and <= this list's Size The toIndex value must be positive and <= this list's Size The fromIndex value must be <= toIndex value If fromIndex and toIndex are equal, the returned list has 1 entry. @param integer fromIndex Low endpoint (INCLUSIVE) of the subList @param integer toIndex High endpoint (INCLUSIVE) of the subList @return IList a List containing the items. Has at least 1 entry. */
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
List () /* Default constructor */
List (INPUT) /* Constructor. Allows the construction of a new List with a provided backing list. Called from SubList(). @param Progress.Collections.IList<Object> */
List (IList) /* Constructor. @param OpenEdge.Core.Collections.IList A collection whose contents to add to this List */

Property Summary
Options Name Purpose
INTEGER Size


Method Detail
Top

LOGICAL Add (integer, Object)

Purpose: Inserts the specified element at the specified position in this list.
@throws Progress.Lang.SysError(18193)
Parameters:
pSeq INTEGER
pItem Progress.Lang.Object
Returns LOGICAL
Logical Returns true if the operation succeeded
Top

LOGICAL Add (Object)

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

LOGICAL AddAll (integer, ICollection)

Purpose: Adds all of the input collection to the current list, starting at the
index given (ie the index passed is the first item)
Parameters:
pSeq INTEGER
pCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
logical TRUE if items were added (ie the input collection has at least one item)
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:
pCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
logical TRUE if items were added (ie the input collection has at least one item)
Top

LOGICAL AddArray (integer, Object[])

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

LOGICAL AddArray (Object[])

Purpose: Adds an array of elements to the collection
Parameters:
pItems 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:
poElement 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)

/* Two Lists are defined to be equal if they are the same size and
all of the elements in this collection are in the to-compare List and
in the same sequence.
Parameters:
o Progress.Lang.Object
Returns LOGICAL
logical TRUE if the Lists are equal. FALSE otherwise
Top

Progress.Lang.Object Get (integer)

/* Returns the object represented by the index
Parameters:
pIdx INTEGER
Returns Progress.Lang.Object
Object The object represented by the sequence. May be ?
Top

INTEGER IndexOf (Object)

Purpose: Returns the index in this list of the first occurrence of the specified
element, or 0 if this list does not contain this element.
Parameters:
pItem Progress.Lang.Object
Returns INTEGER
integer The index of the passed-in object
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

INTEGER LastIndexOf (Object)

Purpose: Returns the index in this list of the last occurrence of the
specified element, or 0 if this list does not contain this element.
Parameters:
pItem Progress.Lang.Object
Returns INTEGER
integer The index of the last occurrence of the object
Top

OpenEdge.Core.Collections.IListIterator ListIterator ()

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

OpenEdge.Core.Collections.IListIterator ListIterator (integer)

Purpose: Returns a list iterator of the elements in this list (in proper sequence),
starting at the specified position in this list.
Parameters:
pStartIdx INTEGER
Returns OpenEdge.Core.Collections.IListIterator
IListIterator The ordered iterator
Top

Progress.Lang.Object Remove (integer)

Purpose: Removes an item at the given index
@throws Progress.Lang.SysError(18193)
Parameters:
pIdx INTEGER
Returns Progress.Lang.Object
Progress.Lang.Object The item that was removed.
Top

LOGICAL Remove (Object)

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

LOGICAL RemoveAll (ICollection)

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

LOGICAL RetainAll (ICollection)

Purpose: Retains only the elements in this list that are contained in the
specified collection (optional operation).
Parameters:
poCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
Logical True if the object changed
Top

Progress.Lang.Object Set (integer, Object)

Purpose: Replaces the element at the specified position in this list with the
specified element
@throws Progress.Lang.SysError(18193)
Parameters:
pIdx INTEGER
poReplacement Progress.Lang.Object
Returns Progress.Lang.Object
Object The object that was replaced/removed from the List
Top

OpenEdge.Core.Collections.IList SubList (integer, integer)

/* Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
The fromIndex value must be positive and <= this list's Size
The toIndex value must be positive and <= this list's Size
The fromIndex value must be <= toIndex value
If fromIndex and toIndex are equal, the returned list has 1 entry.
Parameters:
pFromIndex INTEGER
pToIndex INTEGER
Returns OpenEdge.Core.Collections.IList
IList a List containing the items. Has at least 1 entry.
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

List ()

/* Default constructor
Top

List (INPUT)

/* Constructor.
Allows the construction of a new List with a provided backing list. Called from SubList().
Parameters:
pBackingList UNKNOWN DATATYPE
Top

List (IList)

/* Constructor.
Parameters:
pList OpenEdge.Core.Collections.IList


Property Detail
Top

INTEGER Size

Returns INTEGER


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.6.0