Record Class SyllableInfo
java.lang.Object
java.lang.Record
ca.phon.ipa.SyllableInfo
- Record Components:
constituentType
- syllable constituent typeisDiphthong
- true if element is a diphthong member (only valid for SyllableConstituentType.NUCLEUS)stress
- syllable stresssyllableIndex
- index of syllable in word/phrase
public record SyllableInfo(SyllableConstituentType constituentType, boolean isDiphthong, SyllableStress stress, int syllableIndex, boolean segregated, int sonority, int sonorityDistance, ToneNumber tone)
extends Record
Syllable information for
IPAElement
s.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSyllableInfo
(SyllableConstituentType constituentType, boolean isDiphthong, SyllableStress stress, int syllableIndex, boolean segregated, int sonority, int sonorityDistance, ToneNumber tone) Creates an instance of aSyllableInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic List
<IPAElement> annotateElements
(List<IPAElement> elems) Return a list of elements where the syllable info has been set.static SyllableInfo.Builder
builder()
Create a new builder instance with default values.Returns the value of theconstituentType
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisDiphthong
record component.boolean
Returns the value of thesegregated
record component.int
sonority()
Returns the value of thesonority
record component.int
Returns the value of thesonorityDistance
record component.stress()
Returns the value of thestress
record component.int
Returns the value of thesyllableIndex
record component.Create a builder initialized with the values from this SyllableInfo.tone()
Returns the value of thetone
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SyllableInfo
public SyllableInfo(SyllableConstituentType constituentType, boolean isDiphthong, SyllableStress stress, int syllableIndex, boolean segregated, int sonority, int sonorityDistance, ToneNumber tone) Creates an instance of aSyllableInfo
record class.- Parameters:
constituentType
- the value for theconstituentType
record componentisDiphthong
- the value for theisDiphthong
record componentstress
- the value for thestress
record componentsyllableIndex
- the value for thesyllableIndex
record componentsegregated
- the value for thesegregated
record componentsonority
- the value for thesonority
record componentsonorityDistance
- the value for thesonorityDistance
record componenttone
- the value for thetone
record component
-
-
Method Details
-
builder
Create a new builder instance with default values.- Returns:
- builder
-
toBuilder
Create a builder initialized with the values from this SyllableInfo.- Returns:
- builder pre-populated with this record's values
-
annotateElements
Return a list of elements where the syllable info has been set. It's assumed that syllable constituent type information has been applied to the elements already.- Parameters:
elems
- list of elements- Returns:
- list of elements with syllable info set - these elements have been cloned with new SyllableInfo information
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
constituentType
Returns the value of theconstituentType
record component.- Returns:
- the value of the
constituentType
record component
-
isDiphthong
public boolean isDiphthong()Returns the value of theisDiphthong
record component.- Returns:
- the value of the
isDiphthong
record component
-
stress
-
syllableIndex
public int syllableIndex()Returns the value of thesyllableIndex
record component.- Returns:
- the value of the
syllableIndex
record component
-
segregated
public boolean segregated()Returns the value of thesegregated
record component.- Returns:
- the value of the
segregated
record component
-
sonority
public int sonority()Returns the value of thesonority
record component.- Returns:
- the value of the
sonority
record component
-
sonorityDistance
public int sonorityDistance()Returns the value of thesonorityDistance
record component.- Returns:
- the value of the
sonorityDistance
record component
-
tone
Returns the value of thetone
record component.- Returns:
- the value of the
tone
record component
-