Namespace: OpenEdge.Core.Collections
Type: Class Map
Parent Classes:
Progress.Lang.Object

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


Copyright (c) 2013, 2015, 2017-2018, 2021, 2023 by Progress Software Corporation. All rights reserved.
File:Map
Purpose:A map containing P.L.Object keys and values.
Author(s):hdaniels
Created:Sun Apr 11 01:35:13 EDT 2010
Notes:An implementation of OpenEdge.Core.Collections.IMap
which uses a temp-table for data storage. This class
preserves a FIFO ordering for all keys added to an
object instance of this class.
NOTICE: This class is intended for backwards compatibility
with applications using the OpenEdge.Core.Collections though
for Map objects it is highly recommended to directly use the
new Progress.Collections.HashMap<K,V> class directly.



Method Summary
  Options Name Purpose
  Clear () /* Empties the map's contents */
  LOGICAL ContainsAllKeys (ICollection) /* Returns true if this map contains all of the keys passed in. @param ICollection The collection of keys @return logical TRUE if all of the keys in the input collection are in the map */
  LOGICAL ContainsAllValues (ICollection) /* Returns true if this map contains all of the values passed in. @param ICollection The collection of values @return logical TRUE if all of the values in the input collection are in the map */
  LOGICAL ContainsKey (Object) /* Indicates whether the map contains a particular key @param Object A key value to search @return Logical TRUE if the map contains the key value */
  LOGICAL ContainsValue (Object) /* Returns true if this map contains the value passed in. @param ICollection The value to check @return logical TRUE if the value is in the map */
  LOGICAL Equals (Object) /* Returns true if the given object is also a map and the two Maps represent the same mappings. */
  Progress.Lang.Object Get (Object) /* Returns a value for a given key in the Map @param Object The key fopr which to return a value. NULL/unknown if the key is not in the map @return Object The value represented by the key */
  LOGICAL IsEmpty () /* Indicates whether the map has any entries. @return logical TRUE if the map is empty (no entries) and false otherwise */
  Progress.Lang.Object Put (Object, Object) /* Add entry to the map, return old value of any. Note that return of unknown could also mean that the old mapped value was unknown... (check Size before and after) @param Object The key for this mapping @param Object The value for the mapping @return Object If a value is replaced, the previous value is returned, otherwise null */
  PutAll (IMap) /* Adds all entries from another map to this one. @param IMap The input map */
  Progress.Lang.Object Remove (Object) /* Removes an entry @param Object The key for the entry to remove @param Object the value associated with that key. May be null. Note that return of unknown could also mean that the old mapped value was unknown. */
  RemoveAll (ICollection) /** Removes the mappings for all key from this map if it is present (optional operation). @param ICollection A collection of keys to remove */

Constructor Summary
  Options Name Purpose
  Map () /* Default constructor */
  Map (IMap) /* Constructor. Creates a new map an populates with with a set of values. @param IMap Contains values to add to this map */

Property Summary
  Options Name Purpose
  OpenEdge.Core.Collections.ISet EntrySet
  OpenEdge.Core.Collections.ISet KeySet
  INTEGER Size
  OpenEdge.Core.Collections.ICollection Values


Method Detail
Top

Clear ()

/* Empties the map's contents
Top

LOGICAL ContainsAllKeys (ICollection)

/* Returns true if this map contains all of the keys passed in.
Parameters:
poKeys OpenEdge.Core.Collections.ICollection
 
Returns LOGICAL
  logical TRUE if all of the keys in the input collection are in the map
Top

LOGICAL ContainsAllValues (ICollection)

/* Returns true if this map contains all of the values passed in.
Parameters:
poValues OpenEdge.Core.Collections.ICollection
 
Returns LOGICAL
  logical TRUE if all of the values in the input collection are in the map
Top

LOGICAL ContainsKey (Object)

/* Indicates whether the map contains a particular key
Parameters:
poKey Progress.Lang.Object
 
Returns LOGICAL
  Logical TRUE if the map contains the key value
Top

LOGICAL ContainsValue (Object)

/* Returns true if this map contains the value passed in.
Parameters:
poValue Progress.Lang.Object
 
Returns LOGICAL
  logical TRUE if the value is in the map
Top

LOGICAL Equals (Object)

/* Returns true if the given object is also a map and the two Maps represent the same mappings.
Parameters:
o Progress.Lang.Object
 
Returns LOGICAL
 
Top

Progress.Lang.Object Get (Object)

/* Returns a value for a given key in the Map
Parameters:
poKey Progress.Lang.Object
 
Returns Progress.Lang.Object
  Object The value represented by the key
Top

LOGICAL IsEmpty ()

/* Indicates whether the map has any entries.
Returns LOGICAL
  logical TRUE if the map is empty (no entries) and false otherwise
Top

Progress.Lang.Object Put (Object, Object)

/* Add entry to the map, return old value of any. Note that return of unknown could
also mean that the old mapped value was unknown... (check Size before and after)
Parameters:
poKey Progress.Lang.Object
 
poValue Progress.Lang.Object
 
Returns Progress.Lang.Object
  Object If a value is replaced, the previous value is returned, otherwise null
Top

PutAll (IMap)

/* Adds all entries from another map to this one.
Parameters:
poMap OpenEdge.Core.Collections.IMap
 
Top

Progress.Lang.Object Remove (Object)

/* Removes an entry
also mean that the old mapped value was unknown.
Parameters:
poKey Progress.Lang.Object
 
Returns Progress.Lang.Object
 
Top

RemoveAll (ICollection)

Purpose: Removes the mappings for all key from this map if it is present (optional operation).
Parameters:
poKeys OpenEdge.Core.Collections.ICollection
 


Constructor Detail
Top

Map ()

/* Default constructor
Top

Map (IMap)

/* Constructor. Creates a new map an populates with with a set of values.
Parameters:
poMap OpenEdge.Core.Collections.IMap
 


Property Detail
Top

OpenEdge.Core.Collections.ISet EntrySet

Returns OpenEdge.Core.Collections.ISet
 
Top

OpenEdge.Core.Collections.ISet KeySet

Returns OpenEdge.Core.Collections.ISet
 
Top

INTEGER Size

Returns INTEGER
 
Top

OpenEdge.Core.Collections.ICollection Values

Returns OpenEdge.Core.Collections.ICollection