Record Class TimeSignature
java.lang.Object
java.lang.Record
org.episteme.social.arts.music.TimeSignature
- All Implemented Interfaces:
Serializable
public record TimeSignature(int beatsPerMeasure, int beatValue)
extends Record
implements Serializable
Represents a musical time signature (e.g., 4/4).
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTimeSignature(int beatsPerMeasure, int beatValue) Creates an instance of aTimeSignaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebeatsPerMeasurerecord component.intReturns the value of thebeatValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.
-
Constructor Details
-
TimeSignature
public TimeSignature(int beatsPerMeasure, int beatValue) Creates an instance of aTimeSignaturerecord class.- Parameters:
beatsPerMeasure- the value for thebeatsPerMeasurerecord componentbeatValue- the value for thebeatValuerecord component
-
-
Method Details
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
beatsPerMeasure
public int beatsPerMeasure()Returns the value of thebeatsPerMeasurerecord component.- Returns:
- the value of the
beatsPerMeasurerecord component
-
beatValue
public int beatValue()Returns the value of thebeatValuerecord component.- Returns:
- the value of the
beatValuerecord component
-