Package me.folf.podns4j.model
Record Class PronounSet
java.lang.Object
java.lang.Record
me.folf.podns4j.model.PronounSet
- Record Components:
subject- the subject pronoun (e.g., "she", "he", "they")object- the object pronoun (e.g., "her", "him", "them")possessiveDeterminer- the possessive determiner (e.g., "her", "his", "their"), may be nullpossessivePronoun- the possessive pronoun (e.g., "hers", "his", "theirs"), may be nullreflexive- the reflexive pronoun (e.g., "herself", "himself", "themself"), may be null- the tags applied to this pronoun set (immutable)
public record PronounSet(String subject, String object, String possessiveDeterminer, String possessivePronoun, String reflexive, Set<Tag> tags)
extends Record
Represents a set of personal pronouns with optional tags.
-
Constructor Summary
ConstructorsConstructorDescriptionPronounSet(String subject, String object, String possessiveDeterminer, String possessivePronoun, String reflexive, Set<Tag> tags) Validates and copies parameters.PronounSet(String subject, String object, String possessiveDeterminer, String possessivePronoun, Set<Tag> tags) Creates pronoun set with possessive pronoun.Creates pronoun set with possessive determiner.PronounSet(String subject, String object, Set<Tag> tags) Creates pronoun set with subject and object. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if has tag.booleanisPlural()Returns true if plural verb agreement.booleanReturns true if preferred.object()Returns the value of theobjectrecord component.Returns the value of thepossessiveDeterminerrecord component.Returns the value of thepossessivePronounrecord component.Returns the value of thereflexiverecord component.subject()Returns the value of thesubjectrecord component.tags()Returns the value of thetagsrecord component.Returns canonical string representation.toString()Returns a string representation of this record class.
-
Constructor Details
-
PronounSet
public PronounSet(String subject, String object, String possessiveDeterminer, String possessivePronoun, String reflexive, Set<Tag> tags) Validates and copies parameters.- Parameters:
subject- the subjectobject- the objectpossessiveDeterminer- the possessive determinerpossessivePronoun- the possessive pronounreflexive- the reflexivetags- the tags
-
PronounSet
Creates pronoun set with subject and object.- Parameters:
subject- the subjectobject- the objecttags- the tags
-
PronounSet
Creates pronoun set with possessive determiner.- Parameters:
subject- the subjectobject- the objectpossessiveDeterminer- the possessive determinertags- the tags
-
PronounSet
public PronounSet(String subject, String object, String possessiveDeterminer, String possessivePronoun, Set<Tag> tags) Creates pronoun set with possessive pronoun.- Parameters:
subject- the subjectobject- the objectpossessiveDeterminer- the possessive determinerpossessivePronoun- the possessive pronountags- the tags
-
-
Method Details
-
hasTag
Returns true if has tag.- Parameters:
tag- the tag to check- Returns:
- true if has tag
-
isPlural
public boolean isPlural()Returns true if plural verb agreement.- Returns:
- true if plural
-
isPreferred
public boolean isPreferred()Returns true if preferred.- Returns:
- true if preferred
-
toCanonicalString
Returns canonical string representation.- Returns:
- canonical string
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
object
Returns the value of theobjectrecord component.- Returns:
- the value of the
objectrecord component
-
possessiveDeterminer
Returns the value of thepossessiveDeterminerrecord component.- Returns:
- the value of the
possessiveDeterminerrecord component
-
possessivePronoun
Returns the value of thepossessivePronounrecord component.- Returns:
- the value of the
possessivePronounrecord component
-
reflexive
Returns the value of thereflexiverecord component.- Returns:
- the value of the
reflexiverecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-