cnrg.itx.datax
Class PropertiesCollection

java.lang.Object
  |
  +--cnrg.itx.datax.PropertiesCollection

public class PropertiesCollection
extends java.lang.Object
implements java.io.Serializable

Class to implement a collection of properties.

See Also:
Serialized Form

Constructor Summary
PropertiesCollection()
          Default constructor for the PropertiesCollection object.
PropertiesCollection(int channelType)
          Constructor for the PropertiesCollection object with a specific type.
 
Method Summary
 void addProperty(Property p)
          Method to add a property to the collection.
 PropertiesCollection findOptimal(PropertiesCollection pc)
          Method to find the optimal property.
 java.util.Enumeration getProperties()
          Method to get the enumerated properties.
 int getType()
          Method to get the type of the properties collection object.
 PropertiesCollection merge(PropertiesCollection pc)
          Method to merge two property collection objects.
 void setType(int channelType)
          Method to set the type of the properties collection object.
 java.lang.String toString()
          Tranforms this class into String format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertiesCollection

public PropertiesCollection()
Default constructor for the PropertiesCollection object.

PropertiesCollection

public PropertiesCollection(int channelType)
Constructor for the PropertiesCollection object with a specific type.
Parameters:
channelType - the type of the properties collection
Method Detail

setType

public void setType(int channelType)
Method to set the type of the properties collection object.
Parameters:
channelType - the type of the properties collection object

getType

public int getType()
Method to get the type of the properties collection object.
Returns:
int the type of the properties collection object

addProperty

public void addProperty(Property p)
Method to add a property to the collection.
Parameters:
p - the property to add

merge

public PropertiesCollection merge(PropertiesCollection pc)
                           throws DataException
Method to merge two property collection objects.
Parameters:
pc - the property collection object to merge
Returns:
PropertiesCollection the merged property collection
Throws:
DataException - thrown if any of the collections are invalid

findOptimal

public PropertiesCollection findOptimal(PropertiesCollection pc)
                                 throws DataException
Method to find the optimal property.
Parameters:
pc - the property collection to search
Returns:
the optimal property collection

getProperties

public java.util.Enumeration getProperties()
Method to get the enumerated properties.
Returns:
Enumeration the enumerated properties

toString

public java.lang.String toString()
Tranforms this class into String format.
Returns:
the String depiction of PropertiesCollection
Overrides:
toString in class java.lang.Object