
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 = "" |
Properties | |
| String = "" | |
| long | frequency |
| long | reportRate |
| int | hashcode = 0 |
Private Member Functions | |
| void | rehash () |
Class SampDetail hold the detail for a sampling order. Each one of this objects should be unique. Two of theese objects are considered equals if their component, property, frequency and reportRate are equals. For this reason the equals meber had to be overloaded. The hashcode member was also overloaded. This class has no seter members, for that reason values may only be set upon creation, this is a failsafe so you don't accidentaly modify the values once sampling has began. As values can only be set at creation, the hashcode is computed only once, at creation. If later on this class is modified to allow seters this behavior must be kept in mind, and be modified.
| cl::utfsm::samplingSystemUI::core::SampDetail::SampDetail | ( | String | component, | |
| String | property, | |||
| long | frequency, | |||
| long | reportRate | |||
| ) | [inline] |
References rehash().
| boolean cl::utfsm::samplingSystemUI::core::SampDetail::equals | ( | Object | anObject | ) | [inline] |
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.
| anObject | object type to which to compare to. |
References component, frequency, getComponent(), getFrequency(), getProperty(), getReportRate(), and reportRate.
| String cl::utfsm::samplingSystemUI::core::SampDetail::getComponent | ( | ) | [inline] |
References component.
Referenced by equals(), and cl::utfsm::samplingSystemUITestCase::SampDetailTest::testEquals().
| long cl::utfsm::samplingSystemUI::core::SampDetail::getFrequency | ( | ) | [inline] |
References frequency.
Referenced by equals(), and cl::utfsm::samplingSystemUITestCase::SampDetailTest::testEquals().
| String cl::utfsm::samplingSystemUI::core::SampDetail::getProperty | ( | ) | [inline] |
Referenced by equals(), and cl::utfsm::samplingSystemUITestCase::SampDetailTest::testEquals().
| long cl::utfsm::samplingSystemUI::core::SampDetail::getReportRate | ( | ) | [inline] |
References reportRate.
Referenced by equals(), and cl::utfsm::samplingSystemUITestCase::SampDetailTest::testEquals().
| int cl::utfsm::samplingSystemUI::core::SampDetail::hashCode | ( | ) | [inline] |
Return de overloaded version of hashCode. This version return the value of hashcode computed by rehash().
References hashcode.
Referenced by cl::utfsm::samplingSystemUITestCase::SampDetailTest::testEquals().
| void cl::utfsm::samplingSystemUI::core::SampDetail::rehash | ( | ) | [inline, private] |
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'
References component, frequency, hashcode, reportRate, and String.
Referenced by SampDetail().
String cl::utfsm::samplingSystemUI::core::SampDetail::component = "" [package] |
Referenced by equals(), getComponent(), and rehash().
long cl::utfsm::samplingSystemUI::core::SampDetail::frequency [package] |
Referenced by equals(), getFrequency(), and rehash().
int cl::utfsm::samplingSystemUI::core::SampDetail::hashcode = 0 [package] |
Referenced by hashCode(), and rehash().
long cl::utfsm::samplingSystemUI::core::SampDetail::reportRate [package] |
Referenced by equals(), getReportRate(), and rehash().
cl::utfsm::samplingSystemUI::core::SampDetail::String = "" [package] |
Referenced by rehash().
1.6.2