Public Member Functions | |
SampDetail (String component, String property, long frequency, long reportRate) | |
String | getComponent () |
String | getProperty () |
long | getFrequency () |
long | getReportRate () |
boolean | equals (Object anObject) |
int | hashCode () |
Package Attributes | |
String | component = "" |
String | property = "" |
long | frequency |
long | reportRate |
int | hashcode = 0 |
Private Member Functions | |
void | rehash () |
|
|
|
compare with an object and see if they are equal. This is an overloaded version of Object.equals(), this meber returns true if anObject is of class SampDetail, and if all attributes are the same.
|
|
|
|
|
|
|
|
|
|
Return de overloaded version of hashCode. This version return the value of hashcode computed by rehash().
|
|
Hashing funtion. This function computes the hashcode that is returned by invocations of hashCode() member. Since the contract of a Hash Code function is demanding, this function makes use of the hashing function of a tested class. The hashing is done by concatenating the name of the component, property, frequency and reportRate into a String and then calculating the hascode of such string. This ensures us a unique hashcode and a uniformly distributed. hash is calculated over: 'COMPONET_PROPERTY_FREQUENCY_REPORTRATE'
|
|
|
|
|
|
|
|
|
|
|