Record Class Groove.Unit
java.lang.Object
java.lang.Record
com.github.dakusui.symfonion.song.Groove.Unit
- Record Components:
pos- A position at which a given note should be played. Ticks from the beginning of the bar.accentDelta- A delta that indicates how much a given note should be stressed.
- Enclosing class:
Groove
A class that stores a result of Groove.resolve(Fraction).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theaccentDeltarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longpos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Unit
public Unit(long pos, int accentDelta) Creates an instance of aUnitrecord class.- Parameters:
pos- the value for theposrecord componentaccentDelta- the value for theaccentDeltarecord component
-
-
Method Details
-
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 with '=='. -
pos
public long pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
accentDelta
public int accentDelta()Returns the value of theaccentDeltarecord component.- Returns:
- the value of the
accentDeltarecord component
-