clarion.system
Class SpecializedWMChunkCollection

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<java.lang.Object,C>
              extended by clarion.system.AbstractChunkCollection<AbstractChunk>
                  extended by clarion.system.SpecializedWMChunkCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,AbstractChunk>

public class SpecializedWMChunkCollection
extends AbstractChunkCollection<AbstractChunk>

This class implements a specialized working memory chunk collection within CLARION. It extends the AbstractChunkCollection class.

Usage:

This class acts as a container to hold specialized working memory chunks within the working memory.

Version:
6.0.4.5
Author:
Nick Wilson
See Also:
Serialized Form

Field Summary
private  int hash
          The hash for this object.
private static long serialVersionUID
           
 
Constructor Summary
SpecializedWMChunkCollection()
          Initializes a specialized working memory collection.
SpecializedWMChunkCollection(java.util.Collection<? extends AbstractChunk> wmc)
          Initializes a specialized working memory chunk collection with the collection of specialized working memory chunks specified.
SpecializedWMChunkCollection(java.util.Map<? extends java.lang.Object,? extends AbstractChunk> map)
          Initializes the specialized working memory chunk collection with the map of specialized working memory chunks.
 
Method Summary
 SpecializedWMChunkCollection clone()
          Clones the specialized working memory chunk collection (including all of it's chunks).
 boolean containsKeys(java.lang.Object WMCCollection)
          Checks to see if the specified object is a specialized working memory chunk collection and that all of the keys within the specified collection are specified within this collection.
 boolean equals(java.lang.Object WMCCollection)
          Checks to see if the specified object is a specialized working memory chunk collection and that all of the chunks within the specified collection are equal to the chunks in this collection.
 int hashCode()
           
 DimensionValueCollection toDimensionValueCollection()
          Returns the specialized working memory chunk collection as a dimension-value collection that contains a dimension for each unique dimension within the chunks of the collection.
 
Methods inherited from class clarion.system.AbstractChunkCollection
put, putAll
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
containsKey, entrySet, isEmpty, keySet, remove, size, values
 
Methods inherited from class java.util.AbstractMap
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, isEmpty, keySet, remove, size, values
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

hash

private int hash
The hash for this object. When this item is cloned, so is this hash.

Constructor Detail

SpecializedWMChunkCollection

public SpecializedWMChunkCollection()
Initializes a specialized working memory collection.


SpecializedWMChunkCollection

public SpecializedWMChunkCollection(java.util.Collection<? extends AbstractChunk> wmc)
Initializes a specialized working memory chunk collection with the collection of specialized working memory chunks specified.

Parameters:
wmc - The specialized working memory chunks for the collection.

SpecializedWMChunkCollection

public SpecializedWMChunkCollection(java.util.Map<? extends java.lang.Object,? extends AbstractChunk> map)
Initializes the specialized working memory chunk collection with the map of specialized working memory chunks.

Parameters:
map - The map of specialized working memory chunks for the collection.
Method Detail

toDimensionValueCollection

public DimensionValueCollection toDimensionValueCollection()
Returns the specialized working memory chunk collection as a dimension-value collection that contains a dimension for each unique dimension within the chunks of the collection. For all chunks in the collection that contain the same dimension, the values within that dimension will all be placed under a single dimension within the dimension-value collection that is returned.

This method is used to provide the specialized working memory chunks to the subsystems in a format that can be used as input.

Specified by:
toDimensionValueCollection in class AbstractChunkCollection<AbstractChunk>
Returns:
The specialized working memory chunk collection as a dimension-value collection.

containsKeys

public boolean containsKeys(java.lang.Object WMCCollection)
Checks to see if the specified object is a specialized working memory chunk collection and that all of the keys within the specified collection are specified within this collection.

Specified by:
containsKeys in class AbstractChunkCollection<AbstractChunk>
Parameters:
WMCCollection - The collection to compare to this collection.
Returns:
True if this collection contains all of the keys from the specified collection, otherwise false.

equals

public boolean equals(java.lang.Object WMCCollection)
Checks to see if the specified object is a specialized working memory chunk collection and that all of the chunks within the specified collection are equal to the chunks in this collection.

Specified by:
equals in interface java.util.Map<java.lang.Object,AbstractChunk>
Specified by:
equals in class AbstractChunkCollection<AbstractChunk>
Parameters:
WMCCollection - The collection to compare to this collection.
Returns:
True if the two collections are equal, otherwise false.

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map<java.lang.Object,AbstractChunk>
Overrides:
hashCode in class java.util.AbstractMap<java.lang.Object,AbstractChunk>

clone

public SpecializedWMChunkCollection clone()
Clones the specialized working memory chunk collection (including all of it's chunks).

Specified by:
clone in class AbstractChunkCollection<AbstractChunk>
Returns:
A copy of the specialized working memory chunk collection.