@Test public void setIfNull() { final List<Task> taskList = mockTaskList(); pendingTaskCollectionPointer.setIfNull(taskList); final Optional<Collection<Task>> optional = pendingTaskCollectionPointer.getAndSetNull(); assertTrue(optional.isPresent()); assertEquals(taskList, optional.get()); }
synchronized void setIfNull(final Collection<Task> newCollection) { if (this.curTaskCollection == null) { this.curTaskCollection = newCollection; } }
PendingTaskCollectionPointer { synchronized void setIfNull(final Collection<Task> newCollection) { if (this.curTaskCollection == null) { this.curTaskCollection = newCollection; } } }
PendingTaskCollectionPointer { synchronized void setIfNull(final Collection<Task> newCollection) { if (this.curTaskCollection == null) { this.curTaskCollection = newCollection; } } @Inject private  PendingTaskCollectionPointer(); }
PendingTaskCollectionPointer { synchronized void setIfNull(final Collection<Task> newCollection) { if (this.curTaskCollection == null) { this.curTaskCollection = newCollection; } } @Inject private  PendingTaskCollectionPointer(); static PendingTaskCollectionPointer newInstance(); }
PendingTaskCollectionPointer { synchronized void setIfNull(final Collection<Task> newCollection) { if (this.curTaskCollection == null) { this.curTaskCollection = newCollection; } } @Inject private  PendingTaskCollectionPointer(); static PendingTaskCollectionPointer newInstance();  }