dguitar.codecs.guitarPro
Class GPHarmonic

java.lang.Object
  extended bydguitar.codecs.guitarPro.GPHarmonic

public class GPHarmonic
extends java.lang.Object

This class describes an harmonic.

Author:
Matthieu Wipliez

Field Summary
private static GPHarmonic[] _harmonics
          The harmonics.
private static java.lang.String[] _harmonicStrings
          The slides' names.
private  int _index
           
private  int _type
          An harmonic is represented by an integer.
static GPHarmonic ARTIFICIAL_12
          Artificial + 12.
static GPHarmonic ARTIFICIAL_5
          Artificial + 5.
static GPHarmonic ARTIFICIAL_7
          Artificial + 7.
private static int[] harmonicValues
          This declaration must be located before any other static final GPHarmonic
static GPHarmonic NATURAL
          Natural.
static GPHarmonic NONE
          None.
static GPHarmonic PITCH
          Pitch.
static GPHarmonic SEMI
          Semi.
static GPHarmonic TAPPED
          Tapped.
 
Constructor Summary
private GPHarmonic(int value)
          Creates a new Harmonic whose type is type.
 
Method Summary
private static int indexOf(int value)
          Returns the index of the harmonic of type value.
 java.lang.String toString()
          Returns a string representation of this Harmonic.
static GPHarmonic valueOf(int value)
          Returns the GPHarmonic associated with the value type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_index

private int _index

_type

private int _type
An harmonic is represented by an integer.


harmonicValues

private static int[] harmonicValues
This declaration must be located before any other static final GPHarmonic


NONE

public static final GPHarmonic NONE
None.


NATURAL

public static final GPHarmonic NATURAL
Natural.


TAPPED

public static final GPHarmonic TAPPED
Tapped.


PITCH

public static final GPHarmonic PITCH
Pitch.


SEMI

public static final GPHarmonic SEMI
Semi.


ARTIFICIAL_5

public static final GPHarmonic ARTIFICIAL_5
Artificial + 5.


ARTIFICIAL_7

public static final GPHarmonic ARTIFICIAL_7
Artificial + 7.


ARTIFICIAL_12

public static final GPHarmonic ARTIFICIAL_12
Artificial + 12.


_harmonics

private static GPHarmonic[] _harmonics
The harmonics.


_harmonicStrings

private static java.lang.String[] _harmonicStrings
The slides' names.

Constructor Detail

GPHarmonic

private GPHarmonic(int value)
Creates a new Harmonic whose type is type.

Parameters:
value - the harmonic's value.
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this Harmonic.


indexOf

private static int indexOf(int value)
Returns the index of the harmonic of type value.

Parameters:
value - the harmonic type as an integer.
Returns:
the harmonic index.

valueOf

public static GPHarmonic valueOf(int value)
Returns the GPHarmonic associated with the value type.

Parameters:
value - the harmonic integer value.
Returns:
the harmonic associated.