< prev index next >
src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, 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
@@ -64,21 +64,21 @@
* {@code MidiDevice} instance, the following rules apply:
*
* <ul>
* <li>After an explicit open (either before or after implicit opens), the
* device will not be closed by implicit closing. The only way to close an
- * explicitly opened device is an explicit close.</li>
+ * explicitly opened device is an explicit close.
* <li>An explicit close always closes the device, even if it also has been
- * opened implicitly. A subsequent implicit close has no further effect.</li>
+ * opened implicitly. A subsequent implicit close has no further effect.
* </ul>
*
* To detect if a MidiDevice represents a hardware MIDI port, the following
* programming technique can be used:
*
* <pre>{@code
* MidiDevice device = ...;
- * if ( ! (device instanceof Sequencer) && ! (device instanceof Synthesizer)) {
+ * if (!(device instanceof Sequencer) && !(device instanceof Synthesizer)) {
* // we're now sure that device represents a MIDI port
* // ...
* }
* }</pre>
*
@@ -110,11 +110,12 @@
* An application opening a device explicitly with this call has to close
* the device by calling {@link #close}. This is necessary to release system
* resources and allow applications to exit cleanly.
* <p>
* Note that some devices, once closed, cannot be reopened. Attempts to
- * reopen such a device will always result in a MidiUnavailableException.
+ * reopen such a device will always result in a
+ * {@code MidiUnavailableException}.
*
* @throws MidiUnavailableException thrown if the device cannot be opened
* due to resource restrictions
* @throws SecurityException thrown if the device cannot be opened due to
* security restrictions
@@ -196,11 +197,12 @@
*/
Receiver getReceiver() throws MidiUnavailableException;
/**
* Returns all currently active, non-closed receivers connected with this
- * MidiDevice. A receiver can be removed from the device by closing it.
+ * {@code MidiDevice}. A receiver can be removed from the device by closing
+ * it.
* <p>
* Usually the returned receivers implement the {@code MidiDeviceReceiver}
* interface.
*
* @return an unmodifiable list of the open receivers
@@ -229,11 +231,12 @@
*/
Transmitter getTransmitter() throws MidiUnavailableException;
/**
* Returns all currently active, non-closed transmitters connected with this
- * MidiDevice. A transmitter can be removed from the device by closing it.
+ * {@code MidiDevice}. A transmitter can be removed from the device by
+ * closing it.
* <p>
* Usually the returned transmitters implement the
* {@code MidiDeviceTransmitter} interface.
*
* @return an unmodifiable list of the open transmitters
@@ -286,24 +289,26 @@
this.description = description;
this.version = version;
}
/**
- * Reports whether two objects are equal. Returns {@code true} if the
- * objects are identical.
+ * Indicates whether the specified object is equal to this info object,
+ * returning {@code true} if the objects are identical.
*
- * @param obj the reference object with which to compare this object
- * @return {@code true} if this object is the same as the {@code obj}
- * argument; {@code false} otherwise
+ * @param obj the reference object with which to compare
+ * @return {@code true} if this info object is the same as the
+ * {@code obj} argument; {@code false} otherwise
*/
@Override
public final boolean equals(Object obj) {
return super.equals(obj);
}
/**
- * Finalizes the hashcode method.
+ * Returns a hash code value for this info object.
+ *
+ * @return a hash code value for this info object
*/
@Override
public final int hashCode() {
return super.hashCode();
}
@@ -351,7 +356,7 @@
*/
@Override
public final String toString() {
return name;
}
- } // class Info
+ }
}
< prev index next >