Class Guild
Object
Guild
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addGuildrank
(Guildrank rank) Adds a guildrank.boolean
deleteGuildrank
(Guildrank rank) Deletes a guildrank.boolean
getActiveMember
(String name) Searches and returns the person by name in this guild, or null if not found.All members of the guild actively playing the game as of this moment.Returns a description in case the guild is in danger of being purged from the database.getBody()
This is primarily used for displaying the current status of the guild to a member of the guild.getBoss()
Returns the guildmaster of this guild.Indicates the colour of the guild chat.getImage()
Returns an url pointing to an image.The title as visible on the screen.Searches and returns the person by name in this guild, or null if not found.getName()
The name of the guild, is also the primary key.getOwner()
Retrieves the owner, the administrator, of this object.getRank
(int id) Returns the rank based on the rank id/guildlevel.getTitle()
int
hashCode()
void
void
setActiveMembers
(SortedSet<User> personCollection) void
Sets the guildmaster of this guild.void
void
setCreation
(LocalDateTime creation) void
setDaysguilddeath
(Integer daysguilddeath) void
setDescription
(String guilddescription) void
setGuildrankCollection
(SortedSet<Guildrank> guildrankCollection) void
setHomepage
(String guildurl) void
Sets an url pointing to an image.void
setLogonmessage
(String logonmessage) void
setMaxguilddeath
(Integer maxguilddeath) void
setMembers
(SortedSet<User> personCollection) void
setMinguildlevel
(Integer minguildlevel) void
setMinguildmembers
(Integer minguildmembers) void
void
Sets the owner, the administrator, of this object.void
toString()
-
Field Details
-
DEFAULT_GUILDMESSAGE_COLOUR
- See Also:
-
-
Constructor Details
-
Guild
public Guild() -
Guild
-
Guild
-
-
Method Details
-
getName
The name of the guild, is also the primary key.- Returns:
- the name of the guild.
- See Also:
-
setName
-
getTitle
-
getMainTitle
Description copied from interface:DisplayInterface
The title as visible on the screen.- Specified by:
getMainTitle
in interfaceDisplayInterface
- Returns:
-
setTitle
-
getDaysguilddeath
-
setDaysguilddeath
-
getMaxguilddeath
-
setMaxguilddeath
-
getMinguildmembers
-
setMinguildmembers
-
getMinguildlevel
-
setMinguildlevel
-
getDescription
-
setDescription
-
getHomepage
-
setHomepage
-
getActive
-
setActive
-
getCreation
-
setCreation
-
getLogonmessage
-
setLogonmessage
-
getMembers
-
getActiveMembers
-
setMembers
-
setActiveMembers
-
getOwner
-
setOwner
Description copied from interface:Ownage
Sets the owner, the administrator, of this object. -
getBoss
Returns the guildmaster of this guild.- Returns:
- a Person, the guildmaster. Should not be null, ...ever.
-
setBoss
Sets the guildmaster of this guild.- Parameters:
boss
- the new guildmaster. Should never be null.- Throws:
MudException
- if new guildmaster is null, or not a member of this guild.
-
getGuildrankCollection
-
setGuildrankCollection
-
getColour
Indicates the colour of the guild chat. The default is green.- Returns:
- String indicating either a hexadecimal value (for example #FFFFFF) or the name of a colour (for example Blue).
-
setColour
- Parameters:
colour
-- See Also:
-
hashCode
-
equals
-
toString
-
getAlarmDescription
Returns a description in case the guild is in danger of being purged from the database. This is necessary to make sure there is not a plethora of guilds with few members.The following preconditions are in effect:
- the guild is active
- there are too few guildmembers (minguildmembers > amountofmembers)
- Returns:
- String indicating if there are too few members, usually should be the empty string if all is well.
-
getMember
-
getActiveMember
-
getImage
Description copied from interface:DisplayInterface
Returns an url pointing to an image.- Specified by:
getImage
in interfaceDisplayInterface
- Returns:
-
setImage
-
getRank
Returns the rank based on the rank id/guildlevel. In case the rank id does not exist, null will be returned.- Parameters:
id
- the id of the rank/guildlevel- Returns:
- the rank in the guild
-
getBody
This is primarily used for displaying the current status of the guild to a member of the guild.- Specified by:
getBody
in interfaceDisplayInterface
- Returns:
- a string containing the description of the guild.
- Throws:
MudException
-
addGuildrank
Adds a guildrank.- Parameters:
rank
- the rank to add- Returns:
- true if this set did not already contain the specified element
-
deleteGuildrank
Deletes a guildrank.- Parameters:
rank
- the rank to delete- Returns:
- true if this set contained the specified element
-