abc.notation
Class RepeatedPartAbstract

java.lang.Object
  extended byabc.notation.RepeatedPartAbstract
Direct Known Subclasses:
MultiPartsDefinition, RepeatedPart

public abstract class RepeatedPartAbstract
extends java.lang.Object

Abstract class that defines the number of times a part in the score should be repeated.


Constructor Summary
RepeatedPartAbstract()
          Creates a new repeated part.
 
Method Summary
 int getNumberOfRepeats()
          Returns the number of times this part should be repeated.
 void setNumberOfRepeats(int repeatNumber)
          Sets the number of times this part should be repeated.
abstract  Part[] toPartsArray()
          Returns this repeated part as an array of singles parts.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeatedPartAbstract

public RepeatedPartAbstract()
Creates a new repeated part. By default this part is repeated only once.

Method Detail

getNumberOfRepeats

public int getNumberOfRepeats()
Returns the number of times this part should be repeated.

Returns:
The number of times this part should be repeated.

setNumberOfRepeats

public void setNumberOfRepeats(int repeatNumber)
Sets the number of times this part should be repeated.

Parameters:
repeatNumber - The number of times this part should be repeated.

toPartsArray

public abstract Part[] toPartsArray()
Returns this repeated part as an array of singles parts. The playing of this repeated part would sound the same as the playing of the array of parts.

Returns:
An array of singles parts that would sound the same as the playing of this repeated part.