< prev index next >

src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java

Print this page

        

*** 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 --- 1,7 ---- /* ! * Copyright (c) 1999, 2018, 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
*** 24,34 **** */ package javax.sound.midi.spi; import java.util.Arrays; - import java.util.Objects; import javax.sound.midi.MidiDevice; /** * A {@code MidiDeviceProvider} is a factory or provider for a particular type --- 24,33 ----
*** 48,59 **** * @return {@code true} if the specified device is supported, otherwise * {@code false} * @throws NullPointerException if {@code info} is {@code null} */ public boolean isDeviceSupported(final MidiDevice.Info info) { ! Objects.requireNonNull(info); ! return Arrays.asList(getDeviceInfo()).contains(info); } /** * Obtains the set of info objects representing the device or devices * provided by this {@code MidiDeviceProvider}. --- 47,57 ---- * @return {@code true} if the specified device is supported, otherwise * {@code false} * @throws NullPointerException if {@code info} is {@code null} */ public boolean isDeviceSupported(final MidiDevice.Info info) { ! return Arrays.stream(getDeviceInfo()).anyMatch(info::equals); } /** * Obtains the set of info objects representing the device or devices * provided by this {@code MidiDeviceProvider}.
< prev index next >