org.herac.tuxguitar.song.models
Class Duration

java.lang.Object
  extended by org.herac.tuxguitar.song.models.Duration
All Implemented Interfaces:
java.io.Serializable

public class Duration
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int EIGHTH
          Corchea.
static int HALF
          Blanca.
static Tupleto NO_TUPLETO
          Sin tupleto
static int QUARTER
          Negra.
static long QUARTER_TIME
          tiempo por defecto de la Negra.
static int SIXTEENTH
          Semi-Corchea.
static int SIXTY_FOURTH
          Semi-Fusa.
static int THIRTY_SECOND
          Fusa.
static int WHOLE
          Redonda
 
Constructor Summary
Duration(int value)
           
Duration(int value, boolean dotted, boolean doubleDotted, Tupleto tupleto)
           
 
Method Summary
 java.lang.Object clone()
           
static Duration fromTime(long time)
           
static Duration fromTime(long time, Duration minDuration)
           
 long getTime()
           
 Tupleto getTupleto()
           
 int getValue()
           
 boolean isDotted()
           
 boolean isDoubleDotted()
           
 boolean isEqual(Duration d)
           
 int log2()
           
 void setDotted(boolean dotted)
           
 void setDoubleDotted(boolean doubleDotted)
           
 void setValue(int value)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUARTER_TIME

public static final long QUARTER_TIME
tiempo por defecto de la Negra.

See Also:
Constant Field Values

WHOLE

public static final int WHOLE
Redonda

See Also:
Constant Field Values

HALF

public static final int HALF
Blanca.

See Also:
Constant Field Values

QUARTER

public static final int QUARTER
Negra.

See Also:
Constant Field Values

EIGHTH

public static final int EIGHTH
Corchea.

See Also:
Constant Field Values

SIXTEENTH

public static final int SIXTEENTH
Semi-Corchea.

See Also:
Constant Field Values

THIRTY_SECOND

public static final int THIRTY_SECOND
Fusa.

See Also:
Constant Field Values

SIXTY_FOURTH

public static final int SIXTY_FOURTH
Semi-Fusa.

See Also:
Constant Field Values

NO_TUPLETO

public static final Tupleto NO_TUPLETO
Sin tupleto

Constructor Detail

Duration

public Duration(int value,
                boolean dotted,
                boolean doubleDotted,
                Tupleto tupleto)

Duration

public Duration(int value)
Method Detail

getValue

public int getValue()

setValue

public void setValue(int value)

isDotted

public boolean isDotted()

setDotted

public void setDotted(boolean dotted)

isDoubleDotted

public boolean isDoubleDotted()

setDoubleDotted

public void setDoubleDotted(boolean doubleDotted)

getTupleto

public Tupleto getTupleto()

getTime

public long getTime()

fromTime

public static Duration fromTime(long time)

fromTime

public static Duration fromTime(long time,
                                Duration minDuration)

log2

public int log2()

isEqual

public boolean isEqual(Duration d)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object