Class RhythmInfo

java.lang.Object
org.jjazz.rhythmdatabase.api.RhythmInfo
All Implemented Interfaces:
Serializable

public class RhythmInfo extends Object implements Serializable
A descriptor for a rhythm.

Note: tried to make this class a record, but then a strange bug occured when deserializing the object (I guess linked to the List<> parameters), finally back to a standard class.

See Also:
  • Constructor Details

    • RhythmInfo

      public RhythmInfo(Rhythm rhythm, RhythmProvider rhythmProvider)
      Constructs a RhythmInfo from an existing rhythm.
      Parameters:
      rhythm -
      rhythmProvider -
  • Method Details

    • checkConsistency

      public boolean checkConsistency(RhythmProvider rp, Rhythm r)
      Check that this RhythmInfo object matches data from specified rhythm.

      Test only the main fields.

      Parameters:
      rp -
      r -
      Returns:
      False if inconsistency detected (see log file for details).
    • rvInfos

      public List<RhythmInfo.RvInfo> rvInfos()
    • rpInfos

      public List<RhythmInfo.RpInfo> rpInfos()
    • rhythmFeatures

      public RhythmFeatures rhythmFeatures()
    • file

      public File file()
    • rhythmUniqueId

      public String rhythmUniqueId()
    • rhythmProviderId

      public String rhythmProviderId()
    • description

      public String description()
    • preferredTempo

      public int preferredTempo()
    • timeSignature

      public TimeSignature timeSignature()
    • name

      public String name()
    • author

      public String author()
    • version

      public String version()
    • tags

      public String[] tags()
    • isAdaptedRhythm

      public boolean isAdaptedRhythm()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Does not rely on file.
      Overrides:
      hashCode in class Object
      Returns:
    • equals

      public boolean equals(Object obj)
      Does not rely on file.
      Overrides:
      equals in class Object
      Returns: