Class Population<T extends Individual>
java.lang.Object
org.episteme.natural.biology.SocialEntity
org.episteme.natural.biology.SocialCollective<T>
org.episteme.natural.biology.ecology.Population<T>
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Positioned<Place>, SimulationAgent
- Direct Known Subclasses:
Crowd, PsychologicalGroup, Society, SociologicalGroup
public class Population<T extends Individual>
extends SocialCollective<T>
implements Positioned<Place>
Represents a population of individuals of the same species.
Provides population-level analysis: demographics, statistics, growth modeling.
- See Also:
-
Field Summary
Fields inherited from class SocialCollective
cohesion, leader, members -
Constructor Summary
ConstructorsConstructorDescriptionPopulation(String name, Species species, Place territory) Population(Identification id, String name, Species species, Place territory) Population(Identification id, String name, Species species, Place territory, EventDrivenEngine engine) Population(Species species) -
Method Summary
Modifier and TypeMethodDescriptionvoidlonglongcountBySex(BiologicalSex sex) longcountByStage(LifeStage stage) booleandoubledoubleintReturns the position of this entity.doubleintinthashCode()voidprocessEvent(Event event) Process an event delivered to this agent.voidsetIndividuals(Set<T> individuals) voidsetTerritory(Place territory) intsize()toString()Methods inherited from class SocialCollective
getCohesion, getLeader, getMembers, removeMember, setCohesion, setLeaderMethods inherited from class SocialEntity
getEngine, getId, getInfluence, getPrestige, getSimId, getTraits, interact, setEngine, setInfluence, setPrestigeMethods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
Population
-
Population
-
Population
public Population(Identification id, String name, Species species, Place territory, EventDrivenEngine engine) -
Population
-
-
Method Details
-
getSpecies
-
getTerritory
-
setTerritory
-
getPosition
Description copied from interface:PositionedReturns the position of this entity.- Specified by:
getPositionin interfacePositioned<T extends Individual>- Returns:
- the position.
-
getLocation
-
addMember
- Overrides:
addMemberin classSocialCollective<T extends Individual>
-
getIndividuals
-
setIndividuals
-
size
public int size()- Overrides:
sizein classSocialCollective<T extends Individual>
-
countAlive
public long countAlive() -
countByStage
-
countBySex
-
getSexRatio
public double getSexRatio() -
getAverageAge
public double getAverageAge() -
getOldestAge
public int getOldestAge() -
getYoungestAge
public int getYoungestAge() -
getAgeDistribution
-
getFounders
-
getAverageFecundity
public double getAverageFecundity() -
filter
-
equals
-
hashCode
-
processEvent
Description copied from interface:SimulationAgentProcess an event delivered to this agent.- Specified by:
processEventin interfaceSimulationAgent- Specified by:
processEventin classSocialEntity- Parameters:
event- The event to process
-
toString
-