Record Class TranscriptElementLocation
java.lang.Object
java.lang.Record
ca.phon.session.position.TranscriptElementLocation
- Record Components:
transcriptElementIndex
- the index of the transcript elementtier
- the tier namecharPosition
- the character position within the tier content
public record TranscriptElementLocation(int transcriptElementIndex, String tier, int charPosition)
extends Record
Represents a specific character location withing a transcript element. If the transcript element is
a record, tier will be the name of the specific tier. If the transcript element is a comment, the
tier name will be the type of comment, if the transcript element is a gem, tier will be the type of gem.
-
Constructor Summary
ConstructorsConstructorDescriptionTranscriptElementLocation
(int transcriptElementIndex, String tier, int charPosition) Creates an instance of aTranscriptElementLocation
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecharPosition
record component.int
int
compareTo
(TranscriptElementLocation other, List<String> tierList) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.tier()
Returns the value of thetier
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetranscriptElementIndex
record component.boolean
valid()
-
Constructor Details
-
TranscriptElementLocation
Creates an instance of aTranscriptElementLocation
record class.- Parameters:
transcriptElementIndex
- the value for thetranscriptElementIndex
record componenttier
- the value for thetier
record componentcharPosition
- the value for thecharPosition
record component
-
-
Method Details
-
valid
public boolean valid() -
compareTo
-
compareTo
-
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. -
transcriptElementIndex
public int transcriptElementIndex()Returns the value of thetranscriptElementIndex
record component.- Returns:
- the value of the
transcriptElementIndex
record component
-
tier
-
charPosition
public int charPosition()Returns the value of thecharPosition
record component.- Returns:
- the value of the
charPosition
record component
-