Class Scale


  • public class Scale
    extends Object
    Holds data in the database for available scales to be used. This includes enumerated types from the Note and Mode enums.
    • Constructor Detail

      • Scale

        public Scale()
    • Method Detail

      • getId

        public long getId()
        Returns the auto-generated id for the scale.
        Returns:
        The scale's id.
      • setId

        public void setId​(long id)
        Sets the auto-generated id for the scale.
        Parameters:
        id - The id for the scale.
      • getTonic

        @NonNull
        public Note getTonic()
        Returns the tonic of the scale: an enumerated type from the Note enum.
        Returns:
        The scale's tonic.
      • setTonic

        public void setTonic​(@NonNull
                             Note tonic)
        Sets the tonic of the scale: an enumerated type from the Note enum.
        Parameters:
        tonic - The tonic of the scale.
      • getMode

        @NonNull
        public Mode getMode()
        Returns the mode of the scale (major, natural minor, etc.): an enumerated type from the Mode enum.
        Returns:
        The scale's mode.
      • setMode

        public void setMode​(@NonNull
                            Mode mode)
        Sets the mode of the scale (major, natural minor, etc.): an enumerated type from the Mode enum.
        Parameters:
        mode - The mode of the scale.
      • getDifficulty

        public int getDifficulty()
        Returns the difficulty of the scale.
        Returns:
        The scale's difficulty.
      • setDifficulty

        public void setDifficulty​(int difficulty)
        Sets the difficulty of the scale.
        Parameters:
        difficulty - The difficulty of the scale.