示例#1
0
  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;
  }
示例#2
0
 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);
 }
示例#3
0
 public static boolean equals(MidiDevice.Info a, MidiDevice.Info b) {
   return equals(a, b.getName(), b.getVendor(), b.getVersion(), b.getDescription());
 }
示例#4
0
 public String getName() {
   javax.sound.midi.MidiDevice.Info info = device.getDeviceInfo();
   return info.getName() + " " + info.getVendor();
 }
示例#5
0
 public String getSaveName() {
   return info.getDescription() + info.getName() + info.getVendor() + info.getVersion();
 }