| java.lang.Object com.jamonapi.MonKeyBase
MonKeyBase | public class MonKeyBase implements MonKey(Code) | | Class that can be used as a composite key for MonitorFactor.add(compositeKey, 100) method calls
Note the passed in LinkedHashMap is used as a key to another Map that looks up the associated monitor.
Sun java docs says this regarding keys in Maps: "Note: great care must be exercised if mutable objects
are used as map keys. The behavior of a map is not specified if the value of an
object is changed in a manner that affects equals comparisons while the object is a key in the map."
So once a value is placed in the LinkedHashMap is passed to the MonKeyBase
constructor it should not be changed.
|
MonKeyBase | public MonKeyBase(LinkedHashMap keyMap)(Code) | | Calls the other constructor. The keyMap will be used to create the range name
|
MonKeyBase | public MonKeyBase(String rangeKeyStr, LinkedHashMap keyMap)(Code) | | The LinkHashMap will contain key value pairs. For example: fn=steve, ln=souza, age=44. LinkHashMap is used
as the insertion order needs to be retained for displaying header, and data. The rangeKeyString is used
to look up an associated range should one exist
|
equals | public boolean equals(Object compareKey)(Code) | | This method is called automatically by a HashMap when this class is used
as a HashMap key. A Coordinate is considered equal if its x and y
variables have the same value.
|
getBasicHeader | public List getBasicHeader(List header)(Code) | | Puts the word 'Label' into the list. Used in the basic JAMon report
|
getBasicRowData | public List getBasicRowData(List rowData)(Code) | | Returns the values assoicated with the key as a comma delimited entry in the list.
For example if the map contains firstname, lastname, age then something like
steve, souza, 44 would be returned
|
getDisplayHeader | public List getDisplayHeader(List header)(Code) | | Returns each key in the map as a header element in the list
|
getHeader | public List getHeader(List header)(Code) | | Returns each key in the map as a header element in the list
|
getMonKeyMap | public Map getMonKeyMap()(Code) | | Return the map underlying this Object
|
getRangeKey | public String getRangeKey()(Code) | | Returns either the passed in range key, or it builds the key from the maps keys concatenated
|
getRowData | public List getRowData(List rowData)(Code) | | Add each value from the map at an element to the list.
|
getRowDisplayData | public List getRowDisplayData(List rowData)(Code) | | Add each value from the map at an element to the list.
|
getValue | public Object getValue(String key)(Code) | | Returns any object that has a named key. In this keys case 'label' and
'units' makes sense, but any values are acceptible.
|
hashCode | public int hashCode()(Code) | | Used when key is put into a Map to look up the monitor
|
toString | public String toString()(Code) | | Returns a string representation of this object: JAMon Key, firstname=steve, lastname=souza, age=44
|
|
|