|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<java.lang.Object,Dimension>
clarion.system.DimensionValueCollection
public class DimensionValueCollection
This class implements a dimension-value collection within CLARION. It extends the LinkedHashMap class.
Usage:
This class represents the base collection for representing information in the CLARION Library. It is used and referenced heavily throughout the system. Contained within a dimension-value collection are dimension-value pairs.
A dimension-value collection can be used for any of the following:
Note that while we specify this class as containing "dimension-value pairs", it technically only contains dimension (which in turn contains values).
Known Subclasses:
Field Summary | |
---|---|
private int |
hash
The hash for this object. |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
DimensionValueCollection()
Initializes a dimension-value collection. |
|
DimensionValueCollection(java.util.Collection<? extends Dimension> dims)
Initializes a dimension-value collection with the collection of dimensions specified. |
|
DimensionValueCollection(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
Initializes the dimension-value collection with the map of dimensions. |
Method Summary | |
---|---|
DimensionValueCollection |
clone()
Clones the dimension-value collection (including all of it's dimensions). |
boolean |
containsKeys(java.lang.Object DVCollection)
Checks to see if the specified object is a dimension-value collection and that all of the keys within the specified dimension-value collection are specified within this collection. |
boolean |
equals(java.lang.Object DVCollection)
Checks to see if the specified object is a dimension-value collection and that all of the dimensions within the specified collection are equal to the dimensions in this collection. |
int |
getNumDVPairs()
Gets the number of dimension-value pairs. |
java.util.Collection<Value> |
getValueCollection()
Gets a collection containing all of the values within the dimension-value collection. |
int |
hashCode()
|
Dimension |
put(java.lang.Object key,
Dimension dim)
Puts the dimension into the dimension-value collection as long as the dimension is not already in the dimension-value collection. |
void |
putAll(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
Puts all of the dimensions in the map into the dimension-value collection as long as the dimensions are not already in the dimension-value collection. |
int |
size()
Returns the number of dimensions in the dimension-value collection. |
java.lang.String |
toString()
|
Methods inherited from class java.util.LinkedHashMap |
---|
clear, containsValue, get, removeEldestEntry |
Methods inherited from class java.util.HashMap |
---|
containsKey, entrySet, isEmpty, keySet, remove, values |
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, values |
Field Detail |
---|
private static final long serialVersionUID
private int hash
Constructor Detail |
---|
public DimensionValueCollection()
public DimensionValueCollection(java.util.Collection<? extends Dimension> dims)
dims
- The dimensions for the collection.public DimensionValueCollection(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
map
- The map of dimensions for the dimension-value collection.Method Detail |
---|
public int getNumDVPairs()
public Dimension put(java.lang.Object key, Dimension dim) throws java.lang.IllegalArgumentException
put
in interface java.util.Map<java.lang.Object,Dimension>
put
in class java.util.HashMap<java.lang.Object,Dimension>
key
- The key with which the specified dimension is to be associated. This MUST be the ID
of the specified dimension.dim
- The dimension to add to the dimension-value collection.
java.lang.IllegalArgumentException
- If the dimension is already in the dimension-value collection
or the specified key is not the ID of the specified dimension.public void putAll(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
putAll
in interface java.util.Map<java.lang.Object,Dimension>
putAll
in class java.util.HashMap<java.lang.Object,Dimension>
map
- The map of dimensions to add.public boolean equals(java.lang.Object DVCollection)
equals
in interface java.util.Map<java.lang.Object,Dimension>
equals
in class java.util.AbstractMap<java.lang.Object,Dimension>
DVCollection
- The collection to compare to this collection.
public boolean containsKeys(java.lang.Object DVCollection)
DVCollection
- The collection to compare to this collection.
public java.util.Collection<Value> getValueCollection()
Most often within the CLARION Library this method is used to deliver the values of a dimension-value collection in a vector format for the input layer of an implicit module.
public int hashCode()
hashCode
in interface java.util.Map<java.lang.Object,Dimension>
hashCode
in class java.util.AbstractMap<java.lang.Object,Dimension>
public DimensionValueCollection clone()
clone
in class java.util.HashMap<java.lang.Object,Dimension>
public int size()
size
in interface java.util.Map<java.lang.Object,Dimension>
size
in class java.util.HashMap<java.lang.Object,Dimension>
public java.lang.String toString()
toString
in class java.util.AbstractMap<java.lang.Object,Dimension>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |