edu.umich.eecs.tac.props
Class UserPopulationState
java.lang.Object
edu.umich.eecs.tac.props.AbstractTransportable
edu.umich.eecs.tac.props.AbstractTransportableEntryListBacking<S>
edu.umich.eecs.tac.props.AbstractKeyedEntryList<Product,UserPopulationState.UserPopulationEntry>
edu.umich.eecs.tac.props.UserPopulationState
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<Product>, se.sics.isl.transport.Transportable
public class UserPopulationState
- extends AbstractKeyedEntryList<Product,UserPopulationState.UserPopulationEntry>
Created by IntelliJ IDEA.
User: leecallender
Date: Feb 9, 2009
Time: 3:08:04 PM
To change this template use File | Settings | File Templates.
- Author:
- Lee Callender
TODO-Add comentary for which indexes relate to which state.
- See Also:
- Serialized Form
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportableEntryListBacking |
addEntry, afterAddEntry, afterRemoveEntry, beforeAddEntry, beforeRemoveEntry, getEntries, getEntry, readAfterEntries, readBeforeEntries, readWithLock, removeEntry, size, toString, toStringAfterEntries, toStringBeforeEntries, writeAfterEntries, writeBeforeEntries, writeWithLock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UserPopulationState
public UserPopulationState()
createEntry
protected UserPopulationState.UserPopulationEntry createEntry(Product key)
- Description copied from class:
AbstractKeyedEntryList
- Creates a new entry with the given key.
- Specified by:
createEntry
in class AbstractKeyedEntryList<Product,UserPopulationState.UserPopulationEntry>
- Parameters:
key
- the key for the created entry.
- Returns:
- the created entry with the given key.
entryClass
protected java.lang.Class entryClass()
- Description copied from class:
AbstractTransportableEntryListBacking
- Returns class of the entries. The
Class.getSimpleName()
simple
name} of the class will determine how the entries are read in by the
TransportReader
. Implementing classes should return the class of
the generic parameter T
.
- Specified by:
entryClass
in class AbstractTransportableEntryListBacking<UserPopulationState.UserPopulationEntry>
- Returns:
- the class of the entries.
getDistribution
public final int[] getDistribution(Product product)
- Returns the advertiser sales profit for the product. The sales profit is zero if the product is not in the retail
catalog.
- Parameters:
product
- the product
- Returns:
- the advertiser sales profit for the product.
getDistribution
public final int[] getDistribution(int index)
- Returns the advertiser sales profit for the product at the index.
- Parameters:
index
- the index for the product
- Returns:
- the advertiser sales profit for the product.
setDistribution
public void setDistribution(Product product,
int[] distribution)
setDistribution
public void setDistribution(int index,
int[] distribution)
addProduct
public final int addProduct(Product product)
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.