public static boolean equals( MidiDevice.Info info, String name, String vendor, String version, String description) { return eq(info.getName(), name) && eq(info.getVendor(), vendor) && eq(info.getVersion(), version) && eq(info.getDescription(), description); }
public final boolean equals(Object obj) { if (obj instanceof BlueMidiDevice) { BlueMidiDevice dev2 = (BlueMidiDevice) obj; MidiDevice.Info info2 = dev2.info; return (info.getDescription().equals(info2.getDescription()) && info.getName().equals(info2.getName()) && info.getVendor().equals(info2.getVendor()) && info.getVersion().equals(info2.getVersion())); } return false; }
/** * Indicates whether the device provider supports the device represented by the specified device * info object. * * @param info an info object that describes the device for which support is queried * @return <code>true</code> if the specified device is supported, otherwise <code>false</code> */ public boolean isDeviceSupported(MidiDevice.Info info) { MidiDevice.Info infos[] = getDeviceInfo(); for (int i = 0; i < infos.length; i++) { if (info.equals(infos[i])) { return true; } } return false; }
public static boolean equals(MidiDevice.Info a, MidiDevice.Info b) { return equals(a, b.getName(), b.getVendor(), b.getVersion(), b.getDescription()); }
public String getName() { javax.sound.midi.MidiDevice.Info info = device.getDeviceInfo(); return info.getName() + " " + info.getVendor(); }
public String toString() { if (info != null) { return info.getName(); } return "Error"; }
public String getSaveName() { return info.getDescription() + info.getName() + info.getVendor() + info.getVersion(); }