| Modifier and Type | Field and Description |
|---|---|
private org.joda.time.DateTime |
birthDate |
private Date |
date |
private int |
fightingSkill |
private static RandomNameLoader |
firstNameLoader |
private static RandomNameLoader |
lastNameLoader |
private String |
name |
private int |
navigationSkill |
private Random |
rnd |
private int |
salary |
private Optional<IShip> |
ship |
private static com.google.common.collect.Range<Integer> |
skillRange |
private int |
tradingSkill |
| Constructor and Description |
|---|
CaptainState() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignToShip(IShip ship)
Assign a captain to a ship.
|
int |
getAge()
Current age of the captain
|
Optional<IShip> |
getAssignedShip()
Get the ship the captain is assigned to.
|
int |
getFightSkillLevel()
Retrieve the level in sea fights between [0,5]
|
String |
getName()
Retrieve the name of the captain
|
int |
getNavigationSkillLevel()
Retrieve the level in navigation between [0,5]
|
int |
getSalary()
Retrieve the salary per day.
|
int |
getTradingSkillLevel()
Retrieve the level in trading between [0,5]
|
private void |
init() |
void |
setFightSkillLevel(int level)
Set the new fight skill level between [0..5]
|
void |
setNavigationSkillLevel(int level)
Set the new navigation skill level between [0..5]
|
void |
setSalary(int salary)
Set the new salary
|
void |
setTradingSkillLevel(int level)
Set the new trading skill level between [0..5]
|
@Autowired private Date date
@Autowired private Random rnd
private org.joda.time.DateTime birthDate
private String name
private int salary
private int tradingSkill
private int navigationSkill
private int fightingSkill
private static final com.google.common.collect.Range<Integer> skillRange
private static RandomNameLoader firstNameLoader
private static RandomNameLoader lastNameLoader
@PostConstruct private void init()
public int getAge()
ICaptainpublic String getName()
ICaptainpublic int getSalary()
ICaptainpublic int getTradingSkillLevel()
ICaptaingetTradingSkillLevel in interface ICaptainpublic int getNavigationSkillLevel()
ICaptaingetNavigationSkillLevel in interface ICaptainpublic int getFightSkillLevel()
ICaptaingetFightSkillLevel in interface ICaptainpublic void setTradingSkillLevel(int level)
level - public void setNavigationSkillLevel(int level)
level - public void setFightSkillLevel(int level)
level - public void setSalary(int salary)
salary - public void assignToShip(IShip ship)
ICaptainassignToShip in interface ICaptainship - to which the captain is assigned.public Optional<IShip> getAssignedShip()
getAssignedShip in interface ICaptainCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.