diff options
Diffstat (limited to 'libjava/classpath/javax/sound/sampled')
4 files changed, 28 insertions, 27 deletions
diff --git a/libjava/classpath/javax/sound/sampled/AudioFileFormat.java b/libjava/classpath/javax/sound/sampled/AudioFileFormat.java index 37c2df4652c..899258c050b 100644 --- a/libjava/classpath/javax/sound/sampled/AudioFileFormat.java +++ b/libjava/classpath/javax/sound/sampled/AudioFileFormat.java @@ -122,7 +122,7 @@ public class AudioFileFormat 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 @@ public class AudioFileFormat this.format = fmt; this.type = type; this.frameLength = frameLen; - this.properties = Collections.EMPTY_MAP; + this.properties = Collections.<String, Object> emptyMap(); } /** @@ -159,7 +159,7 @@ public class AudioFileFormat 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 @@ public class AudioFileFormat this.format = fmt; this.type = type; this.frameLength = frameLen; - this.properties = Collections.EMPTY_MAP; + this.properties = Collections.<String, Object> emptyMap(); } /** diff --git a/libjava/classpath/javax/sound/sampled/AudioFormat.java b/libjava/classpath/javax/sound/sampled/AudioFormat.java index a474ff9a5c4..6296784426c 100644 --- a/libjava/classpath/javax/sound/sampled/AudioFormat.java +++ b/libjava/classpath/javax/sound/sampled/AudioFormat.java @@ -133,7 +133,7 @@ public class AudioFormat */ 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 @@ public class AudioFormat this.frameSize = frameSize; this.frameRate = frameRate; this.bigEndian = bigEndian; - this.properties = Collections.EMPTY_MAP; + this.properties = Collections.<String, Object> emptyMap(); } /** @@ -186,7 +186,7 @@ public class AudioFormat 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 @@ public class AudioFormat this.frameSize = (sampleSizeInBits + 7) / 8 * channels; this.frameRate = sampleRate; this.bigEndian = bigEndian; - this.properties = Collections.EMPTY_MAP; + this.properties = Collections.<String, Object> emptyMap(); } /** diff --git a/libjava/classpath/javax/sound/sampled/AudioSystem.java b/libjava/classpath/javax/sound/sampled/AudioSystem.java index 2f64f92c5c1..e858f176d6b 100644 --- a/libjava/classpath/javax/sound/sampled/AudioSystem.java +++ b/libjava/classpath/javax/sound/sampled/AudioSystem.java @@ -160,7 +160,8 @@ public class AudioSystem */ 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 @@ public class AudioSystem 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 class AudioSystem */ 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 @@ public class AudioSystem 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 class AudioSystem 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 class AudioSystem 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 class AudioSystem */ 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 @@ public class AudioSystem 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 class AudioSystem */ 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 @@ public class AudioSystem 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 class AudioSystem */ 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 @@ public class AudioSystem 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 class AudioSystem */ 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 @@ public class AudioSystem 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 class AudioSystem 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 @@ public class AudioSystem 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 class AudioSystem */ 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 @@ public class AudioSystem 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()]); } /** diff --git a/libjava/classpath/javax/sound/sampled/BooleanControl.java b/libjava/classpath/javax/sound/sampled/BooleanControl.java index 147a7f8b02f..0a78e493fca 100644 --- a/libjava/classpath/javax/sound/sampled/BooleanControl.java +++ b/libjava/classpath/javax/sound/sampled/BooleanControl.java @@ -72,7 +72,6 @@ public abstract class BooleanControl extends Control } } - private Type type; private boolean value; private String trueLabel; private String falseLabel; |