clarion.system
Class GoalCollection

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<C>
                  extended by clarion.system.AbstractOutputChunkCollection<Goal>
                      extended by clarion.system.GoalCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,Goal>

public class GoalCollection
extends AbstractOutputChunkCollection<Goal>

This class implements a goal collection within CLARION. It extends the AbstractOutputChunkCollection class.

Usage:

This class acts as a container for goals.

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

Field Summary
private  int hash
          The hash for this object.
private static long serialVersionUID
           
 
Constructor Summary
GoalCollection()
          Initializes a goal collection.
GoalCollection(java.util.Collection<? extends Goal> Goals)
          Initializes a goal collection with the collection of goals specified.
GoalCollection(java.util.Map<? extends java.lang.Object,? extends Goal> map)
          Initializes the goal collection with the map of goals.
 
Method Summary
 GoalCollection clone()
          Clones the goal collection (including all of the goals in the collection).
 boolean containsKeys(java.lang.Object GCollection)
          Checks to see if the specified object is a goal collection and that all of the keys within the specified goal collection are specified within this collection.
 boolean equals(java.lang.Object GCollection)
          Checks to see if the specified object is an goal collection and that all of the goals within the specified goal collection are equal to the goals in this collection.
 int hashCode()
           
 DimensionValueCollection toDimensionValueCollection()
          Returns the goal collection as a dimension-value collection that contains a dimension for each unique dimension within the goals of the goal 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

GoalCollection

public GoalCollection()
Initializes a goal collection.


GoalCollection

public GoalCollection(java.util.Collection<? extends Goal> Goals)
Initializes a goal collection with the collection of goals specified.

Parameters:
Goals - The goals for the collection.

GoalCollection

public GoalCollection(java.util.Map<? extends java.lang.Object,? extends Goal> map)
Initializes the goal collection with the map of goals.

Parameters:
map - The map of goals for the goal collection.
Method Detail

toDimensionValueCollection

public DimensionValueCollection toDimensionValueCollection()
Returns the goal collection as a dimension-value collection that contains a dimension for each unique dimension within the goals of the goal collection. For all goals in the goal 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 goals to the subsystems in a format that can be used as input.

Specified by:
toDimensionValueCollection in class AbstractChunkCollection<Goal>
Returns:
The goal collection as a dimension-value collection.

containsKeys

public boolean containsKeys(java.lang.Object GCollection)
Checks to see if the specified object is a goal collection and that all of the keys within the specified goal collection are specified within this collection.

Specified by:
containsKeys in class AbstractChunkCollection<Goal>
Parameters:
GCollection - 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 GCollection)
Checks to see if the specified object is an goal collection and that all of the goals within the specified goal collection are equal to the goals in this collection.

Specified by:
equals in interface java.util.Map<java.lang.Object,Goal>
Specified by:
equals in class AbstractChunkCollection<Goal>
Parameters:
GCollection - 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,Goal>
Overrides:
hashCode in class java.util.AbstractMap<java.lang.Object,Goal>

clone

public GoalCollection clone()
Clones the goal collection (including all of the goals in the collection).

Specified by:
clone in class AbstractOutputChunkCollection<Goal>
Returns:
A copy of the goal collection.