Skip navigation links
A B C E G H I L M O P Q R S T 

A

actionPerformed(ActionEvent) - Method in class TraderWindow
Processes GUI events in this window.
addUser(String, String) - Method in class Brokerage
Tries to register a new trader with a given screen name and password.
addUser(String, String) - Method in interface Login
Tries to register a new user with a given screen name and password;

B

Brokerage - Class in <Unnamed>
Represents a brokerage.
Brokerage(StockExchange) - Constructor for class Brokerage
Constructs new brokerage affiliated with a given stock exchange.

C

compare(TradeOrder, TradeOrder) - Method in class PriceComparator
Compares two trade orders.
compareTo(Trader) - Method in class Trader
Compares this trader to another by comparing their screen names case blind.

E

equals(Object) - Method in class Trader
Indicates whether some other trader is "equal to" this one, based on comparing their screen names case blind.

G

getName() - Method in class Trader
Returns the screen name for this trader.
getPassword() - Method in class Trader
Returns the password for this trader.
getPrice() - Method in class TradeOrder
Returns the price per share for this trade order (used by a limit order).
getQuote(String, Trader) - Method in class Brokerage
Requests a quote for a given stock from the stock exachange and passes it along to the trader by calling trader's receiveMessage method.
getQuote() - Method in class Stock
Returns a quote string for this stock.
getQuote(String) - Method in class StockExchange
Returns a quote for a given stock.
getQuote(String) - Method in class Trader
Requests a quote for a given stock symbol from the brokerage by calling brokerage's getQuote.
getShares() - Method in class TradeOrder
Returns the number of shares to be traded in this trade order.
getSymbol() - Method in class TradeOrder
Returns the stock symbol for this trade order.
getTrader() - Method in class TradeOrder
Returns the trader for this trade order.

H

hasMessages() - Method in class Trader
Returns true if this trader has any messages in its mailbox.

I

isBuy() - Method in class TradeOrder
Returns true if this is a buy order; otherwise returns false.
isLimit() - Method in class TradeOrder
Returns true if this is a limit order; otherwise returns false.
isMarket() - Method in class TradeOrder
Returns true if this is a market order; otherwise returns false.
isSell() - Method in class TradeOrder
Returns true if this is a sell order; otherwise returns false.

L

listStock(String, String, double) - Method in class StockExchange
Adds a new stock with given parameters to the listed stocks.
login(String, String) - Method in class Brokerage
Tries to login a trader with a given screen name and password.
Login - Interface in <Unnamed>
Specifies methods for registering and logging in users.
login(String, String) - Method in interface Login
Tries to login a user with a given screen name and password;
LoginWindow - Class in <Unnamed>
Provides GUI for registering and logging in users.
LoginWindow(String, Login) - Constructor for class LoginWindow
Constructs a new login window.
logout(Trader) - Method in class Brokerage
Removes a specified trader from the set of logged-in traders.

M

main(String[]) - Static method in class SafeTrade
 
money - Static variable in class Stock
 

O

openWindow() - Method in class Trader
Creates a new TraderWindow for this trader and saves a reference to it in myWindow.

P

placeOrder(TradeOrder) - Method in class Brokerage
Places an order at the stock exchange.
placeOrder(TradeOrder) - Method in class Stock
Places a trading order for this stock.
placeOrder(TradeOrder) - Method in class StockExchange
Places a trade order by calling stock.placeOrder for the stock specified by the stock symbol in the trade order.
placeOrder(TradeOrder) - Method in class Trader
Places a given order with the brokerage by calling brokerage's placeOrder.
PriceComparator - Class in <Unnamed>
A price comparator for trade orders.
PriceComparator() - Constructor for class PriceComparator
Constructs a price comparator that compares two orders in ascending order.
PriceComparator(boolean) - Constructor for class PriceComparator
Constructs a price comparator that compares two orders in ascending or descending order.

Q

quit() - Method in class Trader
Logs out this trader.

R

receiveMessage(String) - Method in class Trader
Adds msg to this trader's mailbox and displays all messages.

S

SafeTrade - Class in <Unnamed>
The main class for the SafeTrade application.
SafeTrade() - Constructor for class SafeTrade
 
showMessage(String) - Method in class TraderWindow
Displays a message in this window's text area.
Stock - Class in <Unnamed>
Represents a stock in the SafeTrade project
Stock(String, String, double) - Constructor for class Stock
Constructs a new stock with a given symbol, company name, and starting price.
StockExchange - Class in <Unnamed>
Represents a stock exchange.
StockExchange() - Constructor for class StockExchange
Constructs a new stock exchange object.
subtractShares(int) - Method in class TradeOrder
Subtracts a given number of shares from the total number of shares in this trade order.

T

TradeOrder - Class in <Unnamed>
Represents a buy or sell order for trading a given number of shares of a specified stock.
TradeOrder(Trader, String, boolean, boolean, int, double) - Constructor for class TradeOrder
Constructs a new TradeOrder for a given trader, stock symbol, a number of shares, and other parameters.
Trader - Class in <Unnamed>
Represents a stock trader.
Trader(Brokerage, String, String) - Constructor for class Trader
Constructs a new trader, affiliated with a given brockerage, with a given screen name and password.
TraderWindow - Class in <Unnamed>
Provides GUI for a trader.
TraderWindow(Trader) - Constructor for class TraderWindow
Constructs a new trading window for a trader.
A B C E G H I L M O P Q R S T 
Skip navigation links