Package org.bukkit

Enum Note.Tone

java.lang.Object
java.lang.Enum<Note.Tone>
org.bukkit.Note.Tone
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Note.Tone>, java.lang.constant.Constable
Enclosing class:
Note

public static enum Note.Tone
extends java.lang.Enum<Note.Tone>
An enum holding tones.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    A  
    B  
    C  
    D  
    E  
    F  
    G  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static byte TONES_COUNT
    The number of tones including sharped tones.
  • Method Summary

    Modifier and Type Method Description
    static Note.Tone getById​(byte id)
    Deprecated.
    Magic value
    byte getId()
    Deprecated.
    Magic value
    byte getId​(boolean sharped)
    Deprecated.
    Magic value
    boolean isSharpable()
    Returns if this tone could be sharped.
    boolean isSharped​(byte id)
    Deprecated.
    Magic value
    static Note.Tone valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Note.Tone[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static Note.Tone[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Note.Tone valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • getId

      @Deprecated public byte getId()
      Deprecated.
      Magic value
      Returns the not sharped id of this tone.
      Returns:
      the not sharped id of this tone.
    • getId

      @Deprecated public byte getId​(boolean sharped)
      Deprecated.
      Magic value
      Returns the id of this tone. These method allows to return the sharped id of the tone. If the tone couldn't be sharped it always return the not sharped id of this tone.
      Parameters:
      sharped - Set to true to return the sharped id.
      Returns:
      the id of this tone.
    • isSharpable

      public boolean isSharpable()
      Returns if this tone could be sharped.
      Returns:
      if this tone could be sharped.
    • isSharped

      @Deprecated public boolean isSharped​(byte id)
      Deprecated.
      Magic value
      Returns if this tone id is the sharped id of the tone.
      Parameters:
      id - the id of the tone.
      Returns:
      if the tone id is the sharped id of the tone.
      Throws:
      java.lang.IllegalArgumentException - if neither the tone nor the semitone have the id.
    • getById

      @Deprecated public static Note.Tone getById​(byte id)
      Deprecated.
      Magic value
      Returns the tone to id. Also returning the semitones.
      Parameters:
      id - the id of the tone.
      Returns:
      the tone to id.