rails.game
Class StockSpaceType
java.lang.Object
rails.game.StockSpaceType
- All Implemented Interfaces:
- StockSpaceTypeI
public class StockSpaceType
- extends java.lang.Object
- implements StockSpaceTypeI
Objects of this class represent a type of square on the StockMarket with
special properties,usually represented by a non-white square colour. The
default type is "white", which has no special properties.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
colourString
protected java.lang.String colourString
colour
protected java.awt.Color colour
noCertLimit
protected boolean noCertLimit
noHoldLimit
protected boolean noHoldLimit
noBuyLimit
protected boolean noBuyLimit
WHITE
public static final java.lang.String WHITE
- See Also:
- Constant Field Values
StockSpaceType
public StockSpaceType(java.lang.String name)
throws ConfigurationException
- Throws:
ConfigurationException
StockSpaceType
public StockSpaceType(java.lang.String name,
java.lang.String colour)
throws ConfigurationException
- Throws:
ConfigurationException
getName
public java.lang.String getName()
- Specified by:
getName
in interface StockSpaceTypeI
- Returns:
- The square type's name.
getColour
public java.awt.Color getColour()
- Specified by:
getColour
in interface StockSpaceTypeI
- Returns:
- The square type's colour.
isNoBuyLimit
public boolean isNoBuyLimit()
- Specified by:
isNoBuyLimit
in interface StockSpaceTypeI
- Returns:
- TRUE if the square type has no buy limit ("brown area")
isNoCertLimit
public boolean isNoCertLimit()
- Specified by:
isNoCertLimit
in interface StockSpaceTypeI
- Returns:
- TRUE if the square type has no certificate limit ("yellow area")
isNoHoldLimit
public boolean isNoHoldLimit()
- Specified by:
isNoHoldLimit
in interface StockSpaceTypeI
- Returns:
- TRUE if the square type has no hold limit ("orange area")
setNoBuyLimit
public void setNoBuyLimit(boolean b)
- Specified by:
setNoBuyLimit
in interface StockSpaceTypeI
- Parameters:
b
- TRUE if the square type has no buy limit ("brown area")
setNoCertLimit
public void setNoCertLimit(boolean b)
- Specified by:
setNoCertLimit
in interface StockSpaceTypeI
- Parameters:
b
- TRUE if the square type has no certificate limit ("yellow area")
setNoHoldLimit
public void setNoHoldLimit(boolean b)
- Specified by:
setNoHoldLimit
in interface StockSpaceTypeI
- Parameters:
b
- TRUE if the square type has no hold limit ("orange area")