summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-11-02 18:35:11 +0000
committerTom Tromey <tromey@redhat.com>2005-11-02 18:35:11 +0000
commite2c290db26334ecdb3c04c086d530c81c94312e4 (patch)
treecc2389421fcc74c82013cac0044bf00930c6a691
parent46f26ceba116c0116f67188287e37b96cfd8c05a (diff)
downloadclasspath-e2c290db26334ecdb3c04c086d530c81c94312e4.tar.gz
* javax/sound/midi/Instrument.java (Instrument): Genericized argument
type. * javax/sound/midi/SoundbankResource.java (SoundbankResource): Genericized argument type. (getDataClass): Genericized return type. * javax/sound/midi/Sequence.java (tracks): Changed type. (init): Updated. (getTracks): Updated. (getTickLength): Updated.
-rw-r--r--ChangeLog12
-rw-r--r--javax/sound/midi/Instrument.java2
-rw-r--r--javax/sound/midi/Sequence.java10
-rw-r--r--javax/sound/midi/SoundbankResource.java4
4 files changed, 20 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 297b1c12a..290a2c7b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-11-02 Tom Tromey <tromey@redhat.com>
+
+ * javax/sound/midi/Instrument.java (Instrument): Genericized argument
+ type.
+ * javax/sound/midi/SoundbankResource.java (SoundbankResource):
+ Genericized argument type.
+ (getDataClass): Genericized return type.
+ * javax/sound/midi/Sequence.java (tracks): Changed type.
+ (init): Updated.
+ (getTracks): Updated.
+ (getTickLength): Updated.
+
2005-11-01 Roman Kennke <kennke@aicas.com>
* javax/swing/JPopupMenu.java
diff --git a/javax/sound/midi/Instrument.java b/javax/sound/midi/Instrument.java
index 3402e8289..f2821db64 100644
--- a/javax/sound/midi/Instrument.java
+++ b/javax/sound/midi/Instrument.java
@@ -59,7 +59,7 @@ public abstract class Instrument extends SoundbankResource
* @param dataClass the class used to represent sample data for this instrument
*/
protected Instrument(Soundbank soundbank, Patch patch,
- String name, Class dataClass)
+ String name, Class<?> dataClass)
{
super(soundbank, name, dataClass);
this.patch = patch;
diff --git a/javax/sound/midi/Sequence.java b/javax/sound/midi/Sequence.java
index 1a43d207c..2ea201cb2 100644
--- a/javax/sound/midi/Sequence.java
+++ b/javax/sound/midi/Sequence.java
@@ -65,7 +65,7 @@ public class Sequence
/**
* The MIDI tracks used by this sequence.
*/
- protected Vector tracks;
+ protected Vector<Track> tracks;
/**
* Tempo-based timing. Resolution is specified in ticks per beat.
@@ -107,7 +107,7 @@ public class Sequence
this.divisionType = divisionType;
this.resolution = resolution;
- tracks = new Vector(numTracks);
+ tracks = new Vector<Track>(numTracks);
while (numTracks > 0)
tracks.set(--numTracks, new Track());
}
@@ -189,7 +189,7 @@ public class Sequence
*/
public Track[] getTracks()
{
- return (Track[]) tracks.toArray(new Track[tracks.size()]);
+ return tracks.toArray(new Track[tracks.size()]);
}
/**
@@ -224,10 +224,10 @@ public class Sequence
public long getTickLength()
{
long length = 0;
- Iterator itr = tracks.iterator();
+ Iterator<Track> itr = tracks.iterator();
while (itr.hasNext())
{
- Track track = (Track) itr.next();
+ Track track = itr.next();
long trackTicks = track.ticks();
if (trackTicks > length)
length = trackTicks;
diff --git a/javax/sound/midi/SoundbankResource.java b/javax/sound/midi/SoundbankResource.java
index 435017e4c..93f42e48e 100644
--- a/javax/sound/midi/SoundbankResource.java
+++ b/javax/sound/midi/SoundbankResource.java
@@ -58,7 +58,7 @@ public abstract class SoundbankResource
* @param name the name of the resource
* @param dataClass the class used to represent the audio data
*/
- protected SoundbankResource(Soundbank soundbank, String name, Class dataClass)
+ protected SoundbankResource(Soundbank soundbank, String name, Class<?> dataClass)
{
this.soundbank = soundbank;
this.name = name;
@@ -90,7 +90,7 @@ public abstract class SoundbankResource
*
* @return the class used to represent the audio data for this resource
*/
- public Class getDataClass()
+ public Class<?> getDataClass()
{
return dataClass;
}