/Users/lyon/j4p/src/sound/musica/ScaleContainer.java
|
1 /**
2 * Created by IntelliJ IDEA.
3 * User: dlyon
4 * Date: Oct 27, 2003
5 * Time: 2:21:17 PM
6 * To change this template use Options | File Templates.
7 */
8 package sound.musica;
9
10 import java.util.Vector;
11
12 public class ScaleContainer {
13 private Vector v = new Vector();
14 public void add(ScaleInterface si){
15 v.addElement(si);
16 }
17 public ScaleInterface[] getScales() {
18 ScaleInterface si[] = new ScaleInterface[v.size()];
19 v.copyInto(si);
20 return si;
21 }
22 public String toString() {
23 ScaleInterface si[] = getScales();
24 String s = "";
25 for (int i=0; i < si.length; i++)
26 s = s + si[i].toString()+"\n";
27 return s;
28 }
29 }
30