edu.umich.eecs.tac.props
Class RetailCatalog.RetailCatalogEntry

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractKeyedEntry<T>
      extended by edu.umich.eecs.tac.props.AbstractTransportableEntry<Product>
          extended by edu.umich.eecs.tac.props.RetailCatalog.RetailCatalogEntry
All Implemented Interfaces:
KeyedEntry<Product>, java.io.Serializable, se.sics.isl.transport.Transportable
Enclosing class:
RetailCatalog

public static class RetailCatalog.RetailCatalogEntry
extends AbstractTransportableEntry<Product>

The retail catalog entry holds the sales profit for a Product.

See Also:
Serialized Form

Constructor Summary
RetailCatalog.RetailCatalogEntry()
          Creates a retail catalog entry.
RetailCatalog.RetailCatalogEntry(Product product)
          Creates a retail catalog entry for a product.
 
Method Summary
 Product getProduct()
          Returns the product.
 double getSalesProfit()
          Returns the sales profit.
protected  java.lang.String keyNodeName()
          Returns the Product class.
protected  void readEntry(se.sics.isl.transport.TransportReader reader)
          Reads the sales profit from the reader.
protected  void setProduct(Product product)
          Sets the product.
protected  void setSalesProfit(double salesProfit)
          Sets the sales profit.
protected  void writeEntry(se.sics.isl.transport.TransportWriter writer)
          Writes the sales profit to the writer.
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportableEntry
readKey, writeKey
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractKeyedEntry
getKey, getTransportName, read, setKey, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetailCatalog.RetailCatalogEntry

public RetailCatalog.RetailCatalogEntry()
Creates a retail catalog entry.


RetailCatalog.RetailCatalogEntry

public RetailCatalog.RetailCatalogEntry(Product product)
Creates a retail catalog entry for a product.

Parameters:
product - the product.
Method Detail

getProduct

public final Product getProduct()
Returns the product.

Returns:
the product.

setProduct

protected final void setProduct(Product product)
Sets the product.

Parameters:
product - the product.

getSalesProfit

public final double getSalesProfit()
Returns the sales profit.

Returns:
the sales profit.

setSalesProfit

protected final void setSalesProfit(double salesProfit)
Sets the sales profit.

Parameters:
salesProfit - the sales profit.

readEntry

protected final void readEntry(se.sics.isl.transport.TransportReader reader)
                        throws java.text.ParseException
Reads the sales profit from the reader.

Specified by:
readEntry in class AbstractKeyedEntry<Product>
Parameters:
reader - the reader to read the state in from.
Throws:
java.text.ParseException - if an exception occurs reading the sales profit.

writeEntry

protected final void writeEntry(se.sics.isl.transport.TransportWriter writer)
Writes the sales profit to the writer.

Specified by:
writeEntry in class AbstractKeyedEntry<Product>
Parameters:
writer - the writer to write the entry state to

keyNodeName

protected final java.lang.String keyNodeName()
Returns the Product class.

Specified by:
keyNodeName in class AbstractTransportableEntry<Product>
Returns:
the Product class.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.