org.jscience.economics
Class Community

java.lang.Object
  extended by org.jscience.biology.Population
      extended by org.jscience.psychology.social.Group
          extended by org.jscience.economics.Community
All Implemented Interfaces:
TaskProcessor, Positioned
Direct Known Subclasses:
EarthEcosource, Organization

public class Community
extends Group
implements TaskProcessor

A class representing a loose, primitive organization where resources are simply shared.


Constructor Summary
Community(Species species, Place place)
          Creates a new Community object.
Community(Species species, java.util.Set individuals, Place place)
          Creates a new Community object.
 
Method Summary
 void addResource(Resource resource)
          DOCUMENT ME!
 void barterResources(java.util.Set offeredResources, Community otherParty, java.util.Set wantedResources)
          DOCUMENT ME!
 boolean consumeResources(Task task)
          DOCUMENT ME!
 java.util.Set getResources()
          DOCUMENT ME!
 void removeResource(Resource resource)
          DOCUMENT ME!
 void setResources(java.util.Set resources)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.psychology.social.Group
addIndividual, getFormalTerritory, getLeaders, getRelation, removeIndividual, setFormalTerritory, setIndividuals, setLeaders, setRelation
 
Methods inherited from class org.jscience.biology.Population
getIndividuals, getPosition, getSpecies, getTerritory, isContained, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Community

public Community(Species species,
                 Place place)
Creates a new Community object.

Parameters:
species - DOCUMENT ME!
place - DOCUMENT ME!

Community

public Community(Species species,
                 java.util.Set individuals,
                 Place place)
Creates a new Community object.

Parameters:
species - DOCUMENT ME!
individuals - DOCUMENT ME!
place - DOCUMENT ME!
Method Detail

getResources

public java.util.Set getResources()
DOCUMENT ME!

Specified by:
getResources in interface TaskProcessor
Returns:
DOCUMENT ME!

addResource

public void addResource(Resource resource)
DOCUMENT ME!

Parameters:
resource - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

removeResource

public void removeResource(Resource resource)
DOCUMENT ME!

Parameters:
resource - DOCUMENT ME!

setResources

public void setResources(java.util.Set resources)
DOCUMENT ME!

Parameters:
resources - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

barterResources

public void barterResources(java.util.Set offeredResources,
                            Community otherParty,
                            java.util.Set wantedResources)
DOCUMENT ME!

Parameters:
offeredResources - DOCUMENT ME!
otherParty - DOCUMENT ME!
wantedResources - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

consumeResources

public boolean consumeResources(Task task)
DOCUMENT ME!

Specified by:
consumeResources in interface TaskProcessor
Parameters:
task - DOCUMENT ME!
Returns:
DOCUMENT ME!