Package com.jackdaw.chatwithnpc.group
Class Group
java.lang.Object
com.jackdaw.chatwithnpc.group.Group
Group of NPC
The group will record the permanent prompt and temporary event and its parent group.
The permanent prompt and the events will be known by all the members of the group.
Every group will have parents until the parent is "Global".
- Version:
- 1.1
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an event to the groupprotected void
Add a member to the groupGet the data manager of the groupgetEvent()
Get the temporary event of the groupGet the instruction of the grouplong
Get the last load time of the groupGet the last load time of the group in stringGet the member list of the groupgetName()
Get the name of the groupGet the name of the parent groupvoid
popEvent()
Remove the last event from the groupprotected void
removeMember
(String member) Remove a member from the groupvoid
setInstruction
(String instruction) Set the instruction of the groupprotected void
setParentGroup
(String parentGroup) Set the name of the parent groupvoid
updateLastLoadTime
(long time) Update the last load time of the group
-
Field Details
-
name
-
instruction
-
events
-
parentGroup
-
lastLoadTime
protected long lastLoadTime -
memberList
-
-
Method Details
-
getName
Get the name of the group- Returns:
- the name of the group
-
getParentGroup
Get the name of the parent group- Returns:
- the name of the parent group
-
setParentGroup
Set the name of the parent group- Parameters:
parentGroup
- the name of the parent group
-
getLastLoadTime
public long getLastLoadTime()Get the last load time of the group- Returns:
- the last load time of the group
-
getLastLoadTimeString
Get the last load time of the group in string- Returns:
- the last load time of the group in string
-
updateLastLoadTime
public void updateLastLoadTime(long time) Update the last load time of the group- Parameters:
time
- the last load time of the group
-
addEvent
Add an event to the group- Parameters:
event
- the event
-
popEvent
public void popEvent()Remove the last event from the group -
getEvent
Get the temporary event of the group- Returns:
- the temporary event of the group
-
setInstruction
Set the instruction of the group- Parameters:
instruction
- the instruction of the group
-
getInstruction
Get the instruction of the group- Returns:
- the instruction of the group
-
getDataManager
Get the data manager of the group- Returns:
- the data manager of the group
-
addMember
Add a member to the group- Parameters:
member
- the member to add
-
removeMember
Remove a member from the group- Parameters:
member
- the member to remove
-
getMemberList
Get the member list of the group- Returns:
- the member list of the group
-