Class Situation

java.lang.Object
org.episteme.social.sociology.Situation
All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Positioned<Place>
Direct Known Subclasses:
ChatSituation, CivilSituation, EconomicSituation, Election, Ritual, StreetSituation

public class Situation extends Object implements ComprehensiveIdentification, Positioned<Place>
Represents a social interaction context where individuals assume specific roles. Situations often occur at dedicated physical locations and involve common activities or conflicts. Modernized to implement ComprehensiveIdentification and use RoleKind. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Situation

      public Situation(String name, String comments)
      Creates a new social situation.
      Parameters:
      name - the identifying name of the situation
      comments - descriptive details about the situation
      Throws:
      NullPointerException - if any argument is null
      IllegalArgumentException - if name is empty
  • Method Details

    • getId

      public Identification getId()
      Description copied from interface: Identified
      Returns the unique identifier of this entity.
      Specified by:
      getId in interface Identified<Identification>
      Returns:
      the identifier
    • getTraits

      public Map<String,Object> getTraits()
      Description copied from interface: ComprehensiveIdentification
      Returns the traits map for this entity.
      Specified by:
      getTraits in interface Commented
      Specified by:
      getTraits in interface ComprehensiveIdentification
      Returns:
      the traits map
    • getPosition

      public Place getPosition()
      Description copied from interface: Positioned
      Returns the position of this entity.
      Specified by:
      getPosition in interface Positioned<Place>
      Returns:
      the position.
    • setPosition

      public void setPosition(Place place)
    • getRoles

      public Set<Role> getRoles()
      Returns an unmodifiable set of roles currently participating in this situation.
      Returns:
      the participants' roles
    • addParticipant

      public Role addParticipant(Individual individual, String roleName, RoleKind kind)
      Adds an individual in a specific role to this situation.
      Parameters:
      individual - the individual participating
      roleName - the name of the role assumed
      kind - the archetypal classification of the role
      Returns:
      the created role instance
      Throws:
      NullPointerException - if individual, roleName or kind is null
    • addParticipant

      @Deprecated public Role addParticipant(Individual individual, String roleName, int kind)
      Deprecated.
      Legacy method for integer-based role kinds.
    • addRole

      public void addRole(Role role)
      Directly adds a role to this situation.
      Parameters:
      role - the role to add
    • removeParticipant

      public void removeParticipant(Role role)
      Removes a role participant from the situation.
      Parameters:
      role - the role to remove
      Throws:
      NullPointerException - if role is null
    • getIdentification

      @Deprecated public Identification getIdentification()
      Deprecated.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object