void (Transferable t) { Transferable current = myData.isEmpty() ? null : myData.get(0); myData.remove(t); if (Comparing.equal(t, current)) { Transferable newContent = !myData.isEmpty() ? myData.get(0) : new StringSelection(""); setSystemClipboardContent(newContent); fireContentChanged(current, newContent); } }