< prev index next >
src/java.desktop/share/classes/javax/sound/sampled/spi/MixerProvider.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 23,32 ****
--- 23,34 ----
* questions.
*/
package javax.sound.sampled.spi;
+ import java.util.Objects;
+
import javax.sound.sampled.Mixer;
/**
* A provider or factory for a particular mixer type. This mechanism allows the
* implementation to determine how resources are managed in creation /
*** 47,59 ****
--- 49,63 ----
*
* @param info an info object that describes the mixer for which support is
* queried
* @return {@code true} if the specified mixer is supported, otherwise
* {@code false}
+ * @throws NullPointerException if {@code info} is {@code null}
* @see #getMixerInfo()
*/
public boolean isMixerSupported(Mixer.Info info) {
+ Objects.requireNonNull(info);
Mixer.Info infos[] = getMixerInfo();
for(int i=0; i<infos.length; i++){
if( info.equals( infos[i] ) ) {
*** 83,93 ****
* The full set of the mixer info objects that represent the mixers
* supported by this {@code MixerProvider} may be obtained through the
* {@code getMixerInfo} method. Use the {@code isMixerSupported} method to
* test whether this {@code MixerProvider} supports a particular mixer.
*
! * @param info an info object that describes the desired mixer
* @return mixer instance
* @throws IllegalArgumentException if the info object specified does not
* match the info object for a mixer supported by this MixerProvider
* @see #getMixerInfo()
* @see #isMixerSupported(Mixer.Info)
--- 87,98 ----
* The full set of the mixer info objects that represent the mixers
* supported by this {@code MixerProvider} may be obtained through the
* {@code getMixerInfo} method. Use the {@code isMixerSupported} method to
* test whether this {@code MixerProvider} supports a particular mixer.
*
! * @param info an info object that describes the desired mixer,
! * or {@code null} for the system default mixer
* @return mixer instance
* @throws IllegalArgumentException if the info object specified does not
* match the info object for a mixer supported by this MixerProvider
* @see #getMixerInfo()
* @see #isMixerSupported(Mixer.Info)
< prev index next >