clarion.system
Class DriveStrengthCollection

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

public class DriveStrengthCollection
extends AbstractOutputChunkCollection<DriveStrength>

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

Usage:

This class acts as a container to hold drive strengths.

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
DriveStrengthCollection()
          Initializes a drive strength collection.
DriveStrengthCollection(java.util.Collection<? extends DriveStrength> ds)
          Initializes a drive strength collection with the collection of drive strengths specified.
DriveStrengthCollection(java.util.Map<? extends java.lang.Object,? extends DriveStrength> map)
          Initializes the drive strength collection with the map of drive strengths.
 
Method Summary
 DriveStrengthCollection clone()
          Clones the drive strength collection (including all of it's drive strengths).
 boolean containsKeys(java.lang.Object DSCollection)
          Checks to see if the specified object is a drive strength collection and that all of the keys within the specified drive strength collection are specified within this collection.
 boolean equals(java.lang.Object DSCollection)
          Checks to see if the specified object is a drive strength collection and that all of the drive strengths within the specified drive strength collection are equal to the drive strengths in this collection.
 int hashCode()
           
 DimensionValueCollection toDimensionValueCollection()
          Returns the drive strength collection as a dimension-value collection that contains a single dimension, "DRIVE_STRENGTHS", with values that have the same ID and activation as the drive strengths in this 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

DriveStrengthCollection

public DriveStrengthCollection()
Initializes a drive strength collection.


DriveStrengthCollection

public DriveStrengthCollection(java.util.Collection<? extends DriveStrength> ds)
Initializes a drive strength collection with the collection of drive strengths specified.

Parameters:
ds - The drive strengths for the collection.

DriveStrengthCollection

public DriveStrengthCollection(java.util.Map<? extends java.lang.Object,? extends DriveStrength> map)
Initializes the drive strength collection with the map of drive strengths.

Parameters:
map - The map of drive strengths for the drive strength collection.
Method Detail

toDimensionValueCollection

public DimensionValueCollection toDimensionValueCollection()
Returns the drive strength collection as a dimension-value collection that contains a single dimension, "DRIVE_STRENGTHS", with values that have the same ID and activation as the drive strengths in this collection.

This method is used to provide the modules in the MCS with drive strengths in a format that can be input into an implicit module.

Specified by:
toDimensionValueCollection in class AbstractChunkCollection<DriveStrength>
Returns:
The drive strength collection as a dimension-value collection.

containsKeys

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

Specified by:
containsKeys in class AbstractChunkCollection<DriveStrength>
Parameters:
DSCollection - 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 DSCollection)
Checks to see if the specified object is a drive strength collection and that all of the drive strengths within the specified drive strength collection are equal to the drive strengths in this collection.

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

clone

public DriveStrengthCollection clone()
Clones the drive strength collection (including all of it's drive strengths).

Specified by:
clone in class AbstractOutputChunkCollection<DriveStrength>
Returns:
A copy of the drive strength collection.