@MappedSuperclass public abstract class AbstractPersistentAffinityUnit extends AbstractPersistentUnit implements com.bernardomg.tabletop.dreadball.model.unit.AffinityUnit
This is a persistent JPA-Based implementation.
| Constructor and Description |
|---|
AbstractPersistentAffinityUnit()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAffinityGroup(PersistentAffinityGroup affinity)
Adds an affinity group to the unit.
|
void |
addHatedAffinityGroup(PersistentAffinityGroup affinity)
Adds a hated affinity group to the unit.
|
Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> |
getAffinityGroups() |
Integer |
getAllyCost() |
Integer |
getFriendCost() |
Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> |
getHatedAffinityGroups() |
Integer |
getStrangerCost() |
void |
removeAffinityGroup(com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup affinity)
Removes an affinity group from the unit.
|
void |
removeHatedAffinityGroup(com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup affinity)
Removes a hated affinity group from the unit.
|
void |
setAffinityGroups(Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> affinityGroups)
Sets the unit affinities.
|
void |
setAllyCost(Integer cost)
Sets the unit's ally cost.
|
void |
setFriendCost(Integer cost)
Sets the unit's friend cost.
|
void |
setHatedAffinityGroups(Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> affinityGroups)
Sets the unit hated affinities.
|
void |
setStrangerCost(Integer cost)
Sets the unit's stranger cost.
|
addAbility, equals, getAbilities, getAttributes, getCost, getGiant, getId, getMvp, getName, getRole, getTemplateName, hashCode, removeAbility, setAbilities, setAttributes, setCost, setGiant, setId, setName, setPosition, setTemplateName, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic AbstractPersistentAffinityUnit()
public final void addAffinityGroup(PersistentAffinityGroup affinity)
affinity - affinity group to addpublic final void addHatedAffinityGroup(PersistentAffinityGroup affinity)
affinity - affinity group to addpublic final Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> getAffinityGroups()
getAffinityGroups in interface com.bernardomg.tabletop.dreadball.model.unit.AffinityUnitpublic final Integer getAllyCost()
getAllyCost in interface com.bernardomg.tabletop.dreadball.model.unit.AffinityUnitpublic final Integer getFriendCost()
getFriendCost in interface com.bernardomg.tabletop.dreadball.model.unit.AffinityUnitpublic final Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> getHatedAffinityGroups()
getHatedAffinityGroups in interface com.bernardomg.tabletop.dreadball.model.unit.AffinityUnitpublic final Integer getStrangerCost()
getStrangerCost in interface com.bernardomg.tabletop.dreadball.model.unit.AffinityUnitpublic final void removeAffinityGroup(com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup affinity)
affinity - the affinity group to removepublic final void removeHatedAffinityGroup(com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup affinity)
affinity - the hated affinity group to removepublic final void setAffinityGroups(Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> affinityGroups)
All the affinities in the unit will be removed and swapped with the received ones.
affinityGroups - the affinities to set on the unitpublic final void setAllyCost(Integer cost)
cost - the unit's ally costpublic final void setFriendCost(Integer cost)
cost - the unit's friend costpublic final void setHatedAffinityGroups(Collection<com.bernardomg.tabletop.dreadball.model.unit.AffinityGroup> affinityGroups)
All the hated affinities in the unit will be removed and swapped with the received ones.
affinityGroups - the hated affinities to set on the unitpublic final void setStrangerCost(Integer cost)
cost - the unit's stranger costCopyright © 2015–2017 Bernardo MartÃnez Garrido. All rights reserved.