edu.cuny.cat.core
Class Specialist

java.lang.Object
  extended by edu.cuny.cat.core.AccountHolder
      extended by edu.cuny.cat.core.Specialist
All Implemented Interfaces:
edu.cuny.obj.Resetable, java.lang.Cloneable, java.lang.Comparable<AccountHolder>
Direct Known Subclasses:
SpecialistInfo

public class Specialist
extends AccountHolder
implements java.lang.Cloneable

Each instance of this class represents a specialist/market.

Version:
$Revision: 1.17 $
Author:
Kai Cai

Field Summary
protected  double informationFee
          The price of information.
protected  double profitFee
          The charge for profit made by traders in a transaction.
protected  double registrationFee
          The registration cost for a trader.
protected  double shoutFee
          The charge for placing a shout.
protected  java.util.Map<java.lang.String,Trader> traderMap
          Traders registered with this specialist
protected  double transactionFee
          The charge for each transaction.
 
Fields inherited from class edu.cuny.cat.core.AccountHolder
account, desc, id
 
Constructor Summary
Specialist(java.lang.String id)
           
Specialist(java.lang.String id, java.lang.String desc)
           
Specialist(java.lang.String id, java.lang.String desc, double registrationFee, double informationFee, double shoutFee, double transactionFee, double profitFee)
           
 
Method Summary
 void clearTraders()
           
 java.lang.Object clone()
           
 double[] getFees()
           
 double getInformationFee()
           
 double getProfitFee()
           
 double getRegistrationFee()
           
 double getShoutFee()
           
 Trader getTrader(java.lang.String id)
           
 java.util.Map<java.lang.String,Trader> getTraderMap()
           
 double getTransactionFee()
           
 void registerTrader(Trader trader)
           
 void reset()
           
 void setFees(double[] fees)
           
 void setInformationFee(double informationFee)
           
 void setProfitFee(double profitFee)
           
 void setRegistrationFee(double registrationFee)
           
 void setShoutFee(double shoutFee)
           
 void setTransactionFee(double transactionFee)
           
 
Methods inherited from class edu.cuny.cat.core.AccountHolder
compareTo, getAccount, getDescription, getId, setDescription, setId
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registrationFee

protected double registrationFee
The registration cost for a trader.


informationFee

protected double informationFee
The price of information.


shoutFee

protected double shoutFee
The charge for placing a shout.


transactionFee

protected double transactionFee
The charge for each transaction.


profitFee

protected double profitFee
The charge for profit made by traders in a transaction. Different from the other types of charge, this is a fraction rather than an absolute value.


traderMap

protected java.util.Map<java.lang.String,Trader> traderMap
Traders registered with this specialist

Constructor Detail

Specialist

public Specialist(java.lang.String id)

Specialist

public Specialist(java.lang.String id,
                  java.lang.String desc)

Specialist

public Specialist(java.lang.String id,
                  java.lang.String desc,
                  double registrationFee,
                  double informationFee,
                  double shoutFee,
                  double transactionFee,
                  double profitFee)
Method Detail

reset

public void reset()
Specified by:
reset in interface edu.cuny.obj.Resetable
Overrides:
reset in class AccountHolder

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getRegistrationFee

public double getRegistrationFee()

getInformationFee

public double getInformationFee()

getShoutFee

public double getShoutFee()

getTransactionFee

public double getTransactionFee()

getProfitFee

public double getProfitFee()

setRegistrationFee

public void setRegistrationFee(double registrationFee)

setInformationFee

public void setInformationFee(double informationFee)

setShoutFee

public void setShoutFee(double shoutFee)

setTransactionFee

public void setTransactionFee(double transactionFee)

setProfitFee

public void setProfitFee(double profitFee)

setFees

public void setFees(double[] fees)

getFees

public double[] getFees()

registerTrader

public void registerTrader(Trader trader)

getTraderMap

public java.util.Map<java.lang.String,Trader> getTraderMap()

getTrader

public Trader getTrader(java.lang.String id)

clearTraders

public void clearTraders()