Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cl::utfsm::samplingSystemUI::core::SampDetail Class Reference

List of all members.

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 ()

Detailed Description

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.


Constructor & Destructor Documentation

cl::utfsm::samplingSystemUI::core::SampDetail::SampDetail String  component,
String  property,
long  frequency,
long  reportRate
[inline]
 


Member Function Documentation

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.

Parameters:
anObject object type to which to compare to.
Returns:
true or false.

String cl::utfsm::samplingSystemUI::core::SampDetail::getComponent  )  [inline]
 

long cl::utfsm::samplingSystemUI::core::SampDetail::getFrequency  )  [inline]
 

String cl::utfsm::samplingSystemUI::core::SampDetail::getProperty  )  [inline]
 

long cl::utfsm::samplingSystemUI::core::SampDetail::getReportRate  )  [inline]
 

int cl::utfsm::samplingSystemUI::core::SampDetail::hashCode  )  [inline]
 

Return de overloaded version of hashCode. This version return the value of hashcode computed by rehash().

Returns:
int has value

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'

See also:
String


Member Data Documentation

String cl::utfsm::samplingSystemUI::core::SampDetail::component = "" [package]
 

long cl::utfsm::samplingSystemUI::core::SampDetail::frequency [package]
 

int cl::utfsm::samplingSystemUI::core::SampDetail::hashcode = 0 [package]
 

String cl::utfsm::samplingSystemUI::core::SampDetail::property = "" [package]
 

long cl::utfsm::samplingSystemUI::core::SampDetail::reportRate [package]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:10:05 2009 for ACS Java API by doxygen 1.3.8