|
From: <ls...@us...> - 2007-01-07 08:23:34
|
Revision: 3003
http://jnode.svn.sourceforge.net/jnode/?rev=3003&view=rev
Author: lsantha
Date: 2007-01-07 00:23:33 -0800 (Sun, 07 Jan 2007)
Log Message:
-----------
Classpath patches.
Modified Paths:
--------------
trunk/core/src/classpath/javax/javax/sound/midi/Instrument.java
trunk/core/src/classpath/javax/javax/sound/midi/Sequence.java
trunk/core/src/classpath/javax/javax/sound/midi/SoundbankResource.java
trunk/core/src/classpath/javax/javax/sound/sampled/AudioFileFormat.java
trunk/core/src/classpath/javax/javax/sound/sampled/AudioFormat.java
trunk/core/src/classpath/javax/javax/sound/sampled/AudioSystem.java
trunk/core/src/classpath/javax/javax/sound/sampled/BooleanControl.java
trunk/core/src/classpath/javax/javax/sound/sampled/DataLine.java
trunk/core/src/classpath/javax/javax/sound/sampled/Line.java
trunk/core/src/classpath/javax/javax/sound/sampled/Port.java
Modified: trunk/core/src/classpath/javax/javax/sound/midi/Instrument.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/midi/Instrument.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/midi/Instrument.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -59,7 +59,7 @@
* @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;
Modified: trunk/core/src/classpath/javax/javax/sound/midi/Sequence.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/midi/Sequence.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/midi/Sequence.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -65,7 +65,7 @@
/**
* 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 @@
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 Track[] getTracks()
{
- return (Track[]) tracks.toArray(new Track[tracks.size()]);
+ return tracks.toArray(new Track[tracks.size()]);
}
/**
@@ -224,10 +224,10 @@
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;
Modified: trunk/core/src/classpath/javax/javax/sound/midi/SoundbankResource.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/midi/SoundbankResource.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/midi/SoundbankResource.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -58,7 +58,7 @@
* @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 @@
*
* @return the class used to represent the audio data for this resource
*/
- public Class getDataClass()
+ public Class<?> getDataClass()
{
return dataClass;
}
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/AudioFileFormat.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/AudioFileFormat.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/AudioFileFormat.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -122,7 +122,7 @@
private AudioFormat format;
private Type type;
private int frameLength;
- private Map properties;
+ private Map<String, Object> properties;
/**
* Create a new AudioFileFormat given the type, the format, and the
@@ -138,7 +138,7 @@
this.format = fmt;
this.type = type;
this.frameLength = frameLen;
- this.properties = Collections.EMPTY_MAP;
+ this.properties = Collections.<String, Object> emptyMap();
}
/**
@@ -153,13 +153,13 @@
* @param properties the properties
*/
public AudioFileFormat(Type type, AudioFormat fmt, int frameLen,
- Map properties)
+ Map<String, Object> properties)
{
this.byteLength = AudioSystem.NOT_SPECIFIED;
this.format = fmt;
this.type = type;
this.frameLength = frameLen;
- this.properties = Collections.unmodifiableMap(new HashMap(properties));
+ this.properties = Collections.unmodifiableMap(new HashMap<String, Object>(properties));
}
/**
@@ -177,7 +177,7 @@
this.format = fmt;
this.type = type;
this.frameLength = frameLen;
- this.properties = Collections.EMPTY_MAP;
+ this.properties = Collections.<String, Object> emptyMap();
}
/**
@@ -226,7 +226,7 @@
* Return the properties associated with this format, as a Map.
* The returned Map is unmodifiable.
*/
- public Map properties()
+ public Map<String, Object> properties()
{
return properties;
}
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/AudioFormat.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/AudioFormat.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/AudioFormat.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -133,7 +133,7 @@
*/
protected int sampleSizeInBits;
- private Map properties;
+ private Map<String, Object> properties;
/**
* Create a new audio format, given various attributes of it.
@@ -158,7 +158,7 @@
this.frameSize = frameSize;
this.frameRate = frameRate;
this.bigEndian = bigEndian;
- this.properties = Collections.EMPTY_MAP;
+ this.properties = Collections.<String, Object> emptyMap();
}
/**
@@ -177,7 +177,7 @@
*/
public AudioFormat(Encoding encoding, float sampleRate, int sampleSizeInBits,
int channels, int frameSize, float frameRate,
- boolean bigEndian, Map properties)
+ boolean bigEndian, Map<String, Object> properties)
{
this.encoding = encoding;
this.sampleRate = sampleRate;
@@ -186,7 +186,7 @@
this.frameSize = frameSize;
this.frameRate = frameRate;
this.bigEndian = bigEndian;
- this.properties = Collections.unmodifiableMap(new HashMap(properties));
+ this.properties = Collections.unmodifiableMap(new HashMap<String, Object>(properties));
}
/**
@@ -218,7 +218,7 @@
this.frameSize = (sampleSizeInBits + 7) / 8 * channels;
this.frameRate = sampleRate;
this.bigEndian = bigEndian;
- this.properties = Collections.EMPTY_MAP;
+ this.properties = Collections.<String, Object> emptyMap();
}
/**
@@ -319,7 +319,7 @@
* Return a read-only Map holding the properties associated with
* this format.
*/
- public Map properties()
+ public Map<String, Object> properties()
{
return properties;
}
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/AudioSystem.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/AudioSystem.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/AudioSystem.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -160,7 +160,8 @@
*/
public static AudioFileFormat.Type[] getAudioFileTypes()
{
- HashSet result = new HashSet();
+ HashSet<AudioFileFormat.Type> result
+ = new HashSet<AudioFileFormat.Type>();
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
while (i.hasNext())
{
@@ -169,7 +170,7 @@
for (int j = 0; j < types.length; ++j)
result.add(types[j]);
}
- return (AudioFileFormat.Type[]) result.toArray(new AudioFileFormat.Type[result.size()]);
+ return result.toArray(new AudioFileFormat.Type[result.size()]);
}
/**
@@ -180,7 +181,8 @@
*/
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream ais)
{
- HashSet result = new HashSet();
+ HashSet<AudioFileFormat.Type> result
+ = new HashSet<AudioFileFormat.Type>();
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
while (i.hasNext())
{
@@ -189,7 +191,7 @@
for (int j = 0; j < types.length; ++j)
result.add(types[j]);
}
- return (AudioFileFormat.Type[]) result.toArray(new AudioFileFormat.Type[result.size()]);
+ return result.toArray(new AudioFileFormat.Type[result.size()]);
}
/**
@@ -204,7 +206,6 @@
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targ,
AudioInputStream ais)
{
- HashSet result = new HashSet();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -228,7 +229,6 @@
public static AudioInputStream getAudioInputStream(AudioFormat targ,
AudioInputStream ais)
{
- HashSet result = new HashSet();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -416,7 +416,7 @@
*/
public static Mixer.Info[] getMixerInfo()
{
- HashSet result = new HashSet();
+ HashSet<Mixer.Info> result = new HashSet<Mixer.Info>();
Iterator i = ServiceFactory.lookupProviders(MixerProvider.class);
while (i.hasNext())
{
@@ -425,7 +425,7 @@
for (int j = 0; j < is.length; ++j)
result.add(is[j]);
}
- return (Mixer.Info[]) result.toArray(new Mixer.Info[result.size()]);
+ return result.toArray(new Mixer.Info[result.size()]);
}
/**
@@ -474,7 +474,7 @@
*/
public static Line.Info[] getSourceLineInfo(Line.Info info)
{
- HashSet result = new HashSet();
+ HashSet<Line.Info> result = new HashSet<Line.Info>();
Mixer.Info[] infos = getMixerInfo();
for (int i = 0; i < infos.length; ++i)
{
@@ -483,7 +483,7 @@
for (int j = 0; j < srcs.length; ++j)
result.add(srcs[j]);
}
- return (Line.Info[]) result.toArray(new Line.Info[result.size()]);
+ return result.toArray(new Line.Info[result.size()]);
}
/**
@@ -534,7 +534,8 @@
*/
public static AudioFormat.Encoding[] getTargetEncodings(AudioFormat.Encoding source)
{
- HashSet result = new HashSet();
+ HashSet<AudioFormat.Encoding> result
+ = new HashSet<AudioFormat.Encoding>();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -545,7 +546,7 @@
for (int j = 0; j < es.length; ++j)
result.add(es[j]);
}
- return (AudioFormat.Encoding[]) result.toArray(new AudioFormat.Encoding[result.size()]);
+ return result.toArray(new AudioFormat.Encoding[result.size()]);
}
/**
@@ -555,7 +556,8 @@
*/
public static AudioFormat.Encoding[] getTargetEncodings(AudioFormat source)
{
- HashSet result = new HashSet();
+ HashSet<AudioFormat.Encoding> result
+ = new HashSet<AudioFormat.Encoding>();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -564,7 +566,7 @@
for (int j = 0; j < es.length; ++j)
result.add(es[j]);
}
- return (AudioFormat.Encoding[]) result.toArray(new AudioFormat.Encoding[result.size()]);
+ return result.toArray(new AudioFormat.Encoding[result.size()]);
}
/**
@@ -576,7 +578,7 @@
public static AudioFormat[] getTargetFormats(AudioFormat.Encoding encoding,
AudioFormat sourceFmt)
{
- HashSet result = new HashSet();
+ HashSet<AudioFormat> result = new HashSet<AudioFormat>();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -585,7 +587,7 @@
for (int j = 0; j < es.length; ++j)
result.add(es[j]);
}
- return (AudioFormat[]) result.toArray(new AudioFormat[result.size()]);
+ return result.toArray(new AudioFormat[result.size()]);
}
/**
@@ -595,7 +597,7 @@
*/
public static Line.Info[] getTargetLineInfo(Line.Info info)
{
- HashSet result = new HashSet();
+ HashSet<Line.Info> result = new HashSet<Line.Info>();
Mixer.Info[] infos = getMixerInfo();
for (int i = 0; i < infos.length; ++i)
{
@@ -604,7 +606,7 @@
for (int j = 0; j < targs.length; ++j)
result.add(targs[j]);
}
- return (Line.Info[]) result.toArray(new Line.Info[result.size()]);
+ return result.toArray(new Line.Info[result.size()]);
}
/**
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/BooleanControl.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/BooleanControl.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/BooleanControl.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -72,7 +72,6 @@
}
}
- private Type type;
private boolean value;
private String trueLabel;
private String falseLabel;
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/DataLine.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/DataLine.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/DataLine.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -64,7 +64,7 @@
* @param klass the class of the line
* @param fmt the supported format
*/
- public Info(Class klass, AudioFormat fmt)
+ public Info(Class<?> klass, AudioFormat fmt)
{
super(klass);
this.minBufferSize = AudioSystem.NOT_SPECIFIED;
@@ -80,7 +80,7 @@
* @param minSize the minimum buffer size
* @param maxSize the maximum buffer size
*/
- public Info(Class klass, AudioFormat[] fmts, int minSize, int maxSize)
+ public Info(Class<?> klass, AudioFormat[] fmts, int minSize, int maxSize)
{
super(klass);
this.minBufferSize = minSize;
@@ -96,7 +96,7 @@
* @param fmt the supported format
* @param size the buffer size
*/
- public Info(Class klass, AudioFormat fmt, int size)
+ public Info(Class<?> klass, AudioFormat fmt, int size)
{
super(klass);
this.minBufferSize = size;
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/Line.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/Line.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/Line.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -57,7 +57,7 @@
* for instance TargetDataLine.class.
* @param klass the class of the line
*/
- public Info(Class klass)
+ public Info(Class<?> klass)
{
this.klass = klass;
}
@@ -65,7 +65,7 @@
/**
* Return the line's class.
*/
- public Class getLineClass()
+ public Class<?> getLineClass()
{
return klass;
}
Modified: trunk/core/src/classpath/javax/javax/sound/sampled/Port.java
===================================================================
--- trunk/core/src/classpath/javax/javax/sound/sampled/Port.java 2007-01-07 08:23:15 UTC (rev 3002)
+++ trunk/core/src/classpath/javax/javax/sound/sampled/Port.java 2007-01-07 08:23:33 UTC (rev 3003)
@@ -89,7 +89,7 @@
* @param name the name of the line
* @param isSource true if this is an input source
*/
- public Info(Class klass, String name, boolean isSource)
+ public Info(Class<?> klass, String name, boolean isSource)
{
super(klass);
this.name = name;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|