Package jadex.bdi.examples.blackjack
Class GameState
- java.lang.Object
- 
- jadex.bdi.examples.blackjack.GameState
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected PlayerdealerAttribute for slot dealer.SimplePropertyChangeSupportpcsThe helper object for bean events.protected java.util.ListplayersAttribute for slot players.- 
Fields inherited from interface jadex.commons.beans.BeanInfoICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPlayer(Player player)Add a player to this GameState.voidaddPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list.BeanInfo[]getAdditionalBeanInfo()Get additional bean info.BeanDescriptorgetBeanDescriptor()Get the bean descriptor.PlayergetDealer()Get the dealer of this GameState.intgetDefaultEventIndex()Get the default event index.intgetDefaultPropertyIndex()Get the default property index.EventSetDescriptor[]getEventSetDescriptors()Get the event set descriptors.java.awt.ImagegetIcon(int iconKind)Get the icon.MethodDescriptor[]getMethodDescriptors()Get the method descriptors.PlayergetPlayer(int idx)Get an players of this GameState.PlayergetPlayer(java.lang.String name)Get a player per name.Player[]getPlayers()Get the players of this GameState.PropertyDescriptor[]getPropertyDescriptors()Get the property descriptors.java.awt.ImageloadImage(java.lang.String resourceName)Load the image.booleanremovePlayer(Player player)Remove a player from this GameState.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list.voidsetDealer(Player dealer)Set the dealer of this GameState.voidsetPlayer(int idx, Player player)Set a player to this GameState.voidsetPlayers(Player[] players)Set the players of this GameState.java.lang.StringtoString()Get a string representation of this GameState.voidupdateDealer(Player dealer)Update the dealer of this GameState.voidupdateOrAddPlayer(Player player)Add a player to this GameState.
 
- 
- 
- 
Field Detail- 
dealerprotected Player dealer Attribute for slot dealer.
 - 
playersprotected java.util.List players Attribute for slot players.
 - 
pcspublic SimplePropertyChangeSupport pcs The helper object for bean events.
 
- 
 - 
Method Detail- 
getDealerpublic Player getDealer() Get the dealer of this GameState.- Returns:
- dealer
 
 - 
setDealerpublic void setDealer(Player dealer) Set the dealer of this GameState.- Parameters:
- dealer- the value to be set
 
 - 
updateDealerpublic void updateDealer(Player dealer) Update the dealer of this GameState.- Parameters:
- dealer- the value to be set
 
 - 
getPlayerspublic Player[] getPlayers() Get the players of this GameState.- Returns:
- players
 
 - 
setPlayerspublic void setPlayers(Player[] players) Set the players of this GameState.- Parameters:
- players- the value to be set
 
 - 
getPlayerpublic Player getPlayer(int idx) Get an players of this GameState.- Parameters:
- idx- The index.
- Returns:
- players
 
 - 
setPlayerpublic void setPlayer(int idx, Player player)Set a player to this GameState.- Parameters:
- idx- The index.
- player- a value to be added
 
 - 
addPlayerpublic void addPlayer(Player player) Add a player to this GameState.- Parameters:
- player- a value to be removed
 
 - 
removePlayerpublic boolean removePlayer(Player player) Remove a player from this GameState.- Parameters:
- player- a value to be removed
- Returns:
- True when the players have changed.
 
 - 
updateOrAddPlayerpublic void updateOrAddPlayer(Player player) Add a player to this GameState.- Parameters:
- player- a value to be removed
 
 - 
getPlayerpublic Player getPlayer(java.lang.String name) Get a player per name.- Parameters:
- name- The name.
- Returns:
- The player.
 
 - 
getBeanDescriptorpublic BeanDescriptor getBeanDescriptor() Get the bean descriptor.- Specified by:
- getBeanDescriptorin interface- BeanInfo
- Returns:
- The bean descriptor.
 
 - 
getPropertyDescriptorspublic PropertyDescriptor[] getPropertyDescriptors() Get the property descriptors.- Specified by:
- getPropertyDescriptorsin interface- BeanInfo
- Returns:
- The property descriptors.
 
 - 
getDefaultPropertyIndexpublic int getDefaultPropertyIndex() Get the default property index.- Specified by:
- getDefaultPropertyIndexin interface- BeanInfo
- Returns:
- The property index.
 
 - 
getEventSetDescriptorspublic EventSetDescriptor[] getEventSetDescriptors() Get the event set descriptors.- Specified by:
- getEventSetDescriptorsin interface- BeanInfo
- Returns:
- The event set descriptors.
 
 - 
getDefaultEventIndexpublic int getDefaultEventIndex() Get the default event index.- Specified by:
- getDefaultEventIndexin interface- BeanInfo
- Returns:
- The default event index.
 
 - 
getMethodDescriptorspublic MethodDescriptor[] getMethodDescriptors() Get the method descriptors.- Specified by:
- getMethodDescriptorsin interface- BeanInfo
- Returns:
- The method descriptors.
 
 - 
getAdditionalBeanInfopublic BeanInfo[] getAdditionalBeanInfo() Get additional bean info.- Specified by:
- getAdditionalBeanInfoin interface- BeanInfo
- Returns:
- Get additional bean info.
 
 - 
getIconpublic java.awt.Image getIcon(int iconKind) Get the icon.- Returns:
- The icon.
 
 - 
loadImagepublic java.awt.Image loadImage(java.lang.String resourceName) Load the image.- Returns:
- The image.
 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list. The listener is registered for all properties.- Parameters:
- listener- The PropertyChangeListener to be added.
 
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.- Parameters:
- listener- The PropertyChangeListener to be removed.
 
 - 
toStringpublic java.lang.String toString() Get a string representation of this GameState.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- The string representation.
 
 
- 
 
-