rails.game.action
Class BuyStartItem
java.lang.Object
  
rails.game.action.PossibleAction
      
rails.game.action.StartItemAction
          
rails.game.action.BuyStartItem
- All Implemented Interfaces: 
 - java.io.Serializable
 
public class BuyStartItem
- extends StartItemAction
 
- Author:
 
  - Erik Vos
 
- See Also:
 - Serialized Form
 
 
 
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
serialVersionUID
public static final long serialVersionUID
- See Also:
 - Constant Field Values
 
BuyStartItem
public BuyStartItem(StartItem startItem,
                    int price,
                    boolean selected,
                    boolean setSharePriceOnly)
BuyStartItem
public BuyStartItem(StartItem startItem,
                    int price,
                    boolean selected)
getPrice
public int getPrice()
 
isSelected
public boolean isSelected()
 
getAssociatedSharePrice
public int getAssociatedSharePrice()
 
setAssociatedSharePrice
public void setAssociatedSharePrice(int sharePrice)
 
hasSharePriceToSet
public boolean hasSharePriceToSet()
 
setSharePriceOnly
public boolean setSharePriceOnly()
 
getCompanyToSetPriceFor
public java.lang.String getCompanyToSetPriceFor()
 
equalsAsOption
public boolean equalsAsOption(PossibleAction action)
- Description copied from class: 
PossibleAction 
- Compare the choice options of two action objects, without regard to whatever choice has been made, if any.
 In other words: only the server-set (prior) attributes must be compared.
 
This method is used by the server (engine) to validate 
 the incoming action that has actually been chosen in the client (GUI),
 but only for the purpose to check if the chosen option was really on offer,
 not to check if the chosen action is actually valid. 
 These perspectives could give different results in cases where 
 the PossibleAction does not fully restrict choices to valid values only
 (such as the blanket LayTile that does no restrict the hex to lay a tile on,
 or the SetDividend that will accept any revenue value).
- Specified by:
 equalsAsOption in class PossibleAction
 
- Parameters:
 action - Another PossibleAction to compare with.
- Returns:
 - True if the compared PossibleAction object has equal choice options.
 
 
 
equalsAsAction
public boolean equalsAsAction(PossibleAction action)
- Description copied from class: 
PossibleAction 
- Compare the chosen actions of two action objects.
 In other words: the client-set (posterior) attributes must be compared,
 in addition to those server-set (prior) attributes that sufficiently identify the action.
 
This method is used by the server (engine) to check if two action 
 objects represent the same actual action, as is done when reloading a saved file
 (i.e. loading a later stage of the same game).
- Specified by:
 equalsAsAction in class PossibleAction
 
- Parameters:
 action - Another PossibleAction to compare with.
- Returns:
 - True if the compared PossibleAction object has equal selected action values.
 
 
 
toString
public java.lang.String toString()
- Overrides:
 toString in class java.lang.Object