-
- private Runnable disposeOne = new Runnable() {
- @Override
- public void run() {
- if(!disposerQueue.isEmpty()) {
- Runnable runnable = disposerQueue.removeFirst();
- disposeTime.remove(runnable);
- currentlyScheduled = null;
- runnable.run();
- if(DEBUG)
- System.out.println("Executed disposer " + runnable);
- if(!disposerQueue.isEmpty())
- scheduleDispose();
- }
+
+ private Runnable disposeOne = () -> {
+ if(!disposerQueue.isEmpty()) {
+ Runnable runnable = disposerQueue.removeFirst();
+ disposeTime.remove(runnable);
+ currentlyScheduled = null;
+ runnable.run();
+ if(DEBUG)
+ System.out.println("Executed disposer " + runnable);
+ if(!disposerQueue.isEmpty())
+ scheduleDispose();