Class Activity
java.lang.Object
org.episteme.social.psychology.Activity
- All Implemented Interfaces:
Serializable, Commented, Named
Represents a structured activity composed of nested sub-activities or atomic behaviors.
Activities help organize behaviors into goal-oriented sequences for individuals or roles.
* @version 1.7
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubActivity(Activity activity) Adds a sub-activity to this activity.Returns the set of atomic behaviors associated with this activity.Returns the comments associated with this object.getGoal()Returns the goal of the activity.getName()Returns the list of sub-activities.Returns the map of traits/attributes for this object.voidremoveSubActivity(Activity activity) Removes a sub-activity from this activity.voidsetBehaviors(Set<Behavior> behaviors) Sets the atomic behaviors for this activity.voidsetComments(String comments) Sets the comments for this object.voidSets the goal description for this activity.voidsetSubActivities(List<Activity> activities) Sets the sub-activities list.
-
Constructor Details
-
Activity
Creates a new Activity with the specified name.- Parameters:
name- the name of the activity- Throws:
IllegalArgumentException- if name is null or empty
-
-
Method Details
-
getName
-
getComments
Description copied from interface:CommentedReturns the comments associated with this object. Maps to a "comments" trait.- Specified by:
getCommentsin interfaceCommented- Returns:
- the comments
-
setComments
Description copied from interface:CommentedSets the comments for this object. Maps to a "comments" trait.- Specified by:
setCommentsin interfaceCommented- Parameters:
comments- the comments to set
-
getTraits
-
getGoal
-
setGoal
Sets the goal description for this activity.- Parameters:
goal- the new goal- Throws:
NullPointerException- if goal is null
-
getSubActivities
-
addSubActivity
Adds a sub-activity to this activity.- Parameters:
activity- the activity to add- Throws:
IllegalArgumentException- if this activity already has atomic behaviorsNullPointerException- if activity is null
-
removeSubActivity
Removes a sub-activity from this activity.- Parameters:
activity- the activity to remove- Throws:
NullPointerException- if activity is null
-
setSubActivities
Sets the sub-activities list.- Parameters:
activities- the list of activities- Throws:
IllegalArgumentException- if this activity already has atomic behaviorsNullPointerException- if activities is null
-
getBehaviors
-
setBehaviors
Sets the atomic behaviors for this activity.- Parameters:
behaviors- the set of behaviors- Throws:
IllegalArgumentException- if this activity already has sub-activities
-