uk.ac.leeds.ccg.andyt.projects.genesis.core
Class GENESIS_FemaleCollection

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_AgentCollection
      extended by uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_FemaleCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class GENESIS_FemaleCollection
extends GENESIS_AgentCollection
implements java.io.Serializable, java.lang.Comparable

A class for storing GENESIS_Female instances.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_AgentCollection
_Agent_ID_Agent_HashMap, _AgentCollection_ID, _Directory, _GENESIS_AgentCollectionManager, _GENESIS_Environment, _Type
 
Constructor Summary
GENESIS_FemaleCollection()
           
GENESIS_FemaleCollection(GENESIS_Environment a_GENESIS_Environment, long _AgentCollection_ID, java.lang.String _Type)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 java.io.File getDirectory()
          This could be buggy due to rounding errors...
 GENESIS_Female getFemale(java.lang.Long a_Agent_ID)
           _Agent_ID_Agent_HashMap = get_Agent_ID_Agent_HashMap(); if (_Agent_ID_Agent_HashMap.containsKey(a_Agent_ID)){ GENESIS_Female result = (GENESIS_Female) _Agent_ID_Agent_HashMap.get(a_Agent_ID); } else { return null; }
 GENESIS_Female getFemale(java.lang.Long a_Agent_ID, boolean handleOutOfMemoryError)
           
 int hashCode()
           
 void init(GENESIS_Environment a_GENESIS_Environment, long a_AgentCollection_ID, java.lang.String a_Type)
           
 void write(boolean handleOutOfMemoryError)
           
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_AgentCollection
get_Agent_ID_Agent_HashMap, get_AgentCollectionManager_Directory, get_AgentCollectionManager, get_File, get_Type, getAgentCollection_ID, getMaxAgentID, getMaxAgentID, getMinAgentID, getPossibleAgentIDs_HashSet, init_AgentID_Agent_HashMap, isInMemory, remove, swapToFileAgent, swapToFileAgentExcept, swapToFileAgents, swapToFileAgentsExcept, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GENESIS_FemaleCollection

public GENESIS_FemaleCollection()

GENESIS_FemaleCollection

public GENESIS_FemaleCollection(GENESIS_Environment a_GENESIS_Environment,
                                long _AgentCollection_ID,
                                java.lang.String _Type)
Method Detail

init

public final void init(GENESIS_Environment a_GENESIS_Environment,
                       long a_AgentCollection_ID,
                       java.lang.String a_Type)

getDirectory

public java.io.File getDirectory()
This could be buggy due to rounding errors...

Specified by:
getDirectory in class GENESIS_AgentCollection
Returns:
File directory in which Object with _AgentID_Agent_HashMap is (to be) stored.

getFemale

public GENESIS_Female getFemale(java.lang.Long a_Agent_ID,
                                boolean handleOutOfMemoryError)

getFemale

public GENESIS_Female getFemale(java.lang.Long a_Agent_ID)
_Agent_ID_Agent_HashMap = get_Agent_ID_Agent_HashMap(); if (_Agent_ID_Agent_HashMap.containsKey(a_Agent_ID)){ GENESIS_Female result = (GENESIS_Female) _Agent_ID_Agent_HashMap.get(a_Agent_ID); } else { return null; }

Parameters:
a_Agent_ID -
Returns:
GENESIS_Female if it exists in _Agent_ID_Agent_HashMap and null otherwise. If null is returned, the GENESIS_Female is probably Dead and if so can be retrieved from a collection of the dead.

write

public void write(boolean handleOutOfMemoryError)
Specified by:
write in class GENESIS_AgentCollection
Parameters:
handleOutOfMemoryError -

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object