test_class.declarator: fs
test_class.original_string: FutureSubscriber<Integer> fs;
test_class.type: FutureSubscriber<Integer>
test_class.var_name: fs
test_class.file: rxjava/src/test/java/io/reactivex/internal/subscribers/FutureSubscriberTest.java
test_class.identifier: FutureSubscriberTest
test_case.body: @Test
      public void cancel() throws Exception {
          assertFalse(fs.isDone());
  
          assertFalse(fs.isCancelled());
  
          fs.cancel();
  
          fs.cancel();
  
          fs.request(10);
  
          fs.request(-99);
  
          fs.cancel(false);
  
          assertTrue(fs.isDone());
  
          assertTrue(fs.isCancelled());
  
          try {
              fs.get();
              fail("Should have thrown");
          } catch (CancellationException ex) {
              // expected
          }
  
          try {
              fs.get(1, TimeUnit.MILLISECONDS);
              fail("Should have thrown");
          } catch (CancellationException ex) {
              // expected
          }
      }
test_case.class_method_signature: FutureSubscriberTest.cancel()
test_case.full_signature: @Test public void cancel()
test_case.identifier: cancel
test_case.invocations: assertFalse isDone assertFalse isCancelled cancel cancel request request cancel assertTrue isDone assertTrue isCancelled get fail get fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void cancel()
focal_class.declarator: value
focal_class.original_string: T value;
focal_class.type: T
focal_class.var_name: value
focal_class.declarator: error
focal_class.original_string: Throwable error;
focal_class.type: Throwable
focal_class.var_name: error
focal_class.declarator: s
focal_class.modifier: final
focal_class.original_string: final AtomicReference<Subscription> s;
focal_class.type: AtomicReference<Subscription>
focal_class.var_name: s
focal_class.file: rxjava/src/main/java/io/reactivex/internal/subscribers/FutureSubscriber.java
focal_class.identifier: FutureSubscriber
focal_class.interfaces: implements FlowableSubscriber<T>, Future<T>, Subscription
focal_class.class_method_signature: FutureSubscriber.FutureSubscriber()
focal_class.full_signature: public  FutureSubscriber()
focal_class.identifier: FutureSubscriber
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  FutureSubscriber()
focal_class.class_method_signature: FutureSubscriber.cancel(boolean mayInterruptIfRunning)
focal_class.full_signature: @Override public boolean cancel(boolean mayInterruptIfRunning)
focal_class.identifier: cancel
focal_class.modifiers: @Override public
focal_class.parameters: (boolean mayInterruptIfRunning)
focal_class.return: boolean
focal_class.signature: boolean cancel(boolean mayInterruptIfRunning)
focal_class.class_method_signature: FutureSubscriber.isCancelled()
focal_class.full_signature: @Override public boolean isCancelled()
focal_class.identifier: isCancelled
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCancelled()
focal_class.class_method_signature: FutureSubscriber.isDone()
focal_class.full_signature: @Override public boolean isDone()
focal_class.identifier: isDone
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDone()
focal_class.class_method_signature: FutureSubscriber.get()
focal_class.full_signature: @Override public T get()
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T get()
focal_class.class_method_signature: FutureSubscriber.get(long timeout, TimeUnit unit)
focal_class.full_signature: @Override public T get(long timeout, TimeUnit unit)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (long timeout, TimeUnit unit)
focal_class.return: T
focal_class.signature: T get(long timeout, TimeUnit unit)
focal_class.class_method_signature: FutureSubscriber.onSubscribe(Subscription s)
focal_class.full_signature: @Override public void onSubscribe(Subscription s)
focal_class.identifier: onSubscribe
focal_class.modifiers: @Override public
focal_class.parameters: (Subscription s)
focal_class.return: void
focal_class.signature: void onSubscribe(Subscription s)
focal_class.class_method_signature: FutureSubscriber.onNext(T t)
focal_class.full_signature: @Override public void onNext(T t)
focal_class.identifier: onNext
focal_class.modifiers: @Override public
focal_class.parameters: (T t)
focal_class.return: void
focal_class.signature: void onNext(T t)
focal_class.class_method_signature: FutureSubscriber.onError(Throwable t)
focal_class.full_signature: @Override public void onError(Throwable t)
focal_class.identifier: onError
focal_class.modifiers: @Override public
focal_class.parameters: (Throwable t)
focal_class.return: void
focal_class.signature: void onError(Throwable t)
focal_class.class_method_signature: FutureSubscriber.onComplete()
focal_class.full_signature: @Override public void onComplete()
focal_class.identifier: onComplete
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onComplete()
focal_class.class_method_signature: FutureSubscriber.cancel()
focal_class.full_signature: @Override public void cancel()
focal_class.identifier: cancel
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cancel()
focal_class.class_method_signature: FutureSubscriber.request(long n)
focal_class.full_signature: @Override public void request(long n)
focal_class.identifier: request
focal_class.modifiers: @Override public
focal_class.parameters: (long n)
focal_class.return: void
focal_class.signature: void request(long n)
focal_class.superclass: extends CountDownLatch
focal_method.body: @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
          for (;;) {
              Subscription a = s.get();
              if (a == this || a == SubscriptionHelper.CANCELLED) {
                  return false;
              }
  
              if (s.compareAndSet(a, SubscriptionHelper.CANCELLED)) {
                  if (a != null) {
                      a.cancel();
                  }
                  countDown();
                  return true;
              }
          }
      }
focal_method.class_method_signature: FutureSubscriber.cancel(boolean mayInterruptIfRunning)
focal_method.full_signature: @Override public boolean cancel(boolean mayInterruptIfRunning)
focal_method.identifier: cancel
focal_method.invocations: get compareAndSet cancel countDown
focal_method.modifiers: @Override public
focal_method.parameters: (boolean mayInterruptIfRunning)
focal_method.return: boolean
focal_method.signature: boolean cancel(boolean mayInterruptIfRunning)