Package squidpony
Class ProceduralMessaging.AssociatedName
java.lang.Object
squidpony.ProceduralMessaging.AssociatedName
- Enclosing class:
- ProceduralMessaging
public static class ProceduralMessaging.AssociatedName extends Object
Data class that stores a name String and one or more Strings that may be used as part of a title with that name,
typically using categories from
Thesaurus
to add variety.-
Field Summary
Fields Modifier and Type Field Description String
name
Messaging.NounTrait
pronoun
StatefulRNG
srng
GapShuffler<String>
themes
GapShuffler<String>
titles
-
Constructor Summary
Constructors Constructor Description AssociatedName(String name, boolean cipherName, String[] themes, String... titles)
Creates an AssociatedName with the being's name as a String and any associated themes and titles as String arrays, with a boolean after the name that determines whether the name should be "translated" using a NaturalLanguageCipher to some other form.AssociatedName(String name, boolean cipherName, Messaging.NounTrait pronoun, String[] themes, String... titles)
Creates an AssociatedName with the being's name as a String and any associated themes and titles as String arrays, with a boolean after the name that determines whether the name should be "translated" using a NaturalLanguageCipher to some other form. -
Method Summary
-
Field Details
-
Constructor Details
-
AssociatedName
Creates an AssociatedName with the being's name as a String and any associated themes and titles as String arrays, with a boolean after the name that determines whether the name should be "translated" using a NaturalLanguageCipher to some other form. If you gave this:"Brunhilda", true, new String[]{"ice`noun`"}, "Goddess`noun` of Ice`nouns`", "Winter-Empress`noun`", "Heroine`noun` of the North"
, it could use any of the terms inThesaurus
associated with the category"ice`noun`
as themes, could generate titles like "Mother of Blizzards", "Winter-Queen", and "Maiden of the North", and would not actually show the name "Brunhilda" in use, instead producing some similar-length name using the NaturalLanguageCipher that a ProceduralMessaging is created with (defaulting to generic fantasy names). This overload always treats the being as if it is being addressed directly, in second-person singular form.- Parameters:
name
- the String name for the being, which will be changed ifcipherName
is truecipherName
- if true, the name will be changed using a NaturalLanguageCipher before being shownthemes
- a String array (which may be null) of words that may appear more often regarding this beingtitles
- a String array or vararg (which should probably not be null) of special titles for the being
-
AssociatedName
public AssociatedName(String name, boolean cipherName, Messaging.NounTrait pronoun, String[] themes, String... titles)Creates an AssociatedName with the being's name as a String and any associated themes and titles as String arrays, with a boolean after the name that determines whether the name should be "translated" using a NaturalLanguageCipher to some other form. If you gave this:"Brunhilda", true, new String[]{"ice`noun`"}, "Goddess`noun` of Ice`nouns`", "Winter-Empress`noun`", "Heroine`noun` of the North"
, it could use any of the terms inThesaurus
associated with the category"ice`noun`
as themes, could generate titles like "Mother of Blizzards", "Winter-Queen", and "Maiden of the North", and would not actually show the name "Brunhilda" in use, instead producing some similar-length name using the NaturalLanguageCipher that a ProceduralMessaging is created with (defaulting to generic fantasy names). This overload allows theMessaging.NounTrait
to be specified, which allows various ways of addressing the being (first person, second person, or third person; singular or plural; various gender options in the third person).- Parameters:
name
- the String name for the being, which will be changed ifcipherName
is truecipherName
- if true, the name will be changed using a NaturalLanguageCipher before being shownpronoun
- a NounTrait enum that designates how this being should be addressed (often second person singular, but not always)themes
- a String array (which may be null) of words that may appear more often regarding this beingtitles
- a String array or vararg (which should probably not be null) of special titles for the being
-