Tabnine Logo
Integer.intValue
Code IndexAdd Tabnine to your IDE (free)

How to use
intValue
method
in
java.lang.Integer

Best Java code snippets using java.lang.Integer.intValue (Showing top 20 results out of 58,122)

origin: ReactiveX/RxJava

  @Override
  public Integer apply(Integer a, Long b) throws Exception {
    return a + b.intValue();
  }
})
origin: ReactiveX/RxJava

@Test
public void testSynchronousNext() {
  assertEquals(1, BehaviorProcessor.createDefault(1).take(1).blockingSingle().intValue());
  assertEquals(2, BehaviorProcessor.createDefault(2).blockingIterable().iterator().next().intValue());
  assertEquals(3, BehaviorProcessor.createDefault(3).blockingNext().iterator().next().intValue());
}
origin: ReactiveX/RxJava

  @SuppressWarnings("unchecked")
  @Test
  public void scalarCallable() {
    Maybe<Integer> m = Maybe.just(1);

    assertTrue(m.getClass().toString(), m instanceof ScalarCallable);

    assertEquals(1, ((ScalarCallable<Integer>)m).call().intValue());
  }
}
origin: ReactiveX/RxJava

@Test
public void testBackpressureWithInitialValue() throws InterruptedException {
  Observable<Integer> source = Observable.just(1, 2, 3, 4, 5, 6);
  Single<Integer> reduced = source.reduce(0, sum);
  Integer r = reduced.blockingGet();
  assertEquals(21, r.intValue());
}
origin: ReactiveX/RxJava

@Test
public void testBackpressureWithNoInitialValue() throws InterruptedException {
  Observable<Integer> source = Observable.just(1, 2, 3, 4, 5, 6);
  Maybe<Integer> reduced = source.reduce(sum);
  Integer r = reduced.blockingGet();
  assertEquals(21, r.intValue());
}
origin: ReactiveX/RxJava

@Test
public void testLastMultiSubscribe() {
  Maybe<Integer> last = Flowable.just(1, 2, 3).lastElement();
  assertEquals(3, last.blockingGet().intValue());
  assertEquals(3, last.blockingGet().intValue());
}
origin: ReactiveX/RxJava

@Test
public void testBackpressureWithInitialValueObservable() throws InterruptedException {
  Observable<Integer> source = Observable.just(1, 2, 3, 4, 5, 6);
  Observable<Integer> reduced = source.reduce(0, sum).toObservable();
  Integer r = reduced.blockingFirst();
  assertEquals(21, r.intValue());
}
origin: ReactiveX/RxJava

@Test
public void blockingFirst() {
  assertEquals(1, Observable.range(1, 10)
      .subscribeOn(Schedulers.computation()).blockingFirst().intValue());
}
origin: ReactiveX/RxJava

@Test
public void firstFgnoredCancelAndOnNext() {
  Flowable<Integer> source = Flowable.fromPublisher(new Publisher<Integer>() {
    @Override
    public void subscribe(Subscriber<? super Integer> s) {
      s.onSubscribe(new BooleanSubscription());
      s.onNext(1);
      s.onNext(2);
    }
  });
  assertEquals(1, source.blockingFirst().intValue());
}
origin: ReactiveX/RxJava

@Test
public void testElementAt() {
  assertEquals(2, Observable.fromArray(1, 2).elementAt(1).blockingGet()
      .intValue());
}
origin: ReactiveX/RxJava

@Test
public void onNext() throws Exception {
  fo.onNext(1);
  fo.onComplete();
  assertEquals(1, fo.get(5, TimeUnit.MILLISECONDS).intValue());
}
origin: ReactiveX/RxJava

@Test
public void completeAsync() throws Exception {
  Schedulers.single().scheduleDirect(new Runnable() {
    @Override
    public void run() {
      fs.onNext(1);
      fs.onComplete();
    }
  }, 500, TimeUnit.MILLISECONDS);
  assertEquals(1, fs.get().intValue());
}
origin: ReactiveX/RxJava

@Test
public void testElementAt() {
  assertEquals(2, Flowable.fromArray(1, 2).elementAt(1).blockingGet()
      .intValue());
}
origin: ReactiveX/RxJava

@Test
public void await() throws Exception {
  Schedulers.single().scheduleDirect(new Runnable() {
    @Override
    public void run() {
      fo.onNext(1);
      fo.onComplete();
    }
  }, 100, TimeUnit.MILLISECONDS);
  assertEquals(1, fo.get(5, TimeUnit.SECONDS).intValue());
}
origin: ReactiveX/RxJava

@Test
public void testBackpressureWithInitialValue() throws InterruptedException {
  Flowable<Integer> source = Flowable.just(1, 2, 3, 4, 5, 6);
  Single<Integer> reduced = source.reduce(0, sum);
  Integer r = reduced.blockingGet();
  assertEquals(21, r.intValue());
}
origin: ReactiveX/RxJava

@Test
public void completeAsync() throws Exception {
  Schedulers.single().scheduleDirect(new Runnable() {
    @Override
    public void run() {
      fo.onNext(1);
      fo.onComplete();
    }
  }, 500, TimeUnit.MILLISECONDS);
  assertEquals(1, fo.get().intValue());
}
origin: ReactiveX/RxJava

@Test
public void onNextThenOnCompleteTwice() throws Exception {
  fo.onNext(1);
  fo.onComplete();
  fo.onComplete();
  assertEquals(1, fo.get(5, TimeUnit.MILLISECONDS).intValue());
}
origin: ReactiveX/RxJava

@Test
public void testBackpressureWithInitialValueFlowable() throws InterruptedException {
  Flowable<Integer> source = Flowable.just(1, 2, 3, 4, 5, 6);
  Flowable<Integer> reduced = source.reduce(0, sum).toFlowable();
  Integer r = reduced.blockingFirst();
  assertEquals(21, r.intValue());
}
origin: ReactiveX/RxJava

@Test
public void blockingFirst() {
  assertEquals(1, Flowable.range(1, 10)
      .subscribeOn(Schedulers.computation()).blockingFirst().intValue());
}
origin: ReactiveX/RxJava

@Test
public void nextObserverOnNext() throws Exception {
  NextSubscriber<Integer> no = new NextSubscriber<Integer>();
  no.setWaiting();
  no.onNext(Notification.createOnNext(1));
  no.setWaiting();
  no.onNext(Notification.createOnNext(1));
  assertEquals(1, no.takeNext().getValue().intValue());
}
java.langIntegerintValue

Javadoc

Gets the primitive value of this int.

Popular methods of Integer

  • parseInt
    Parses the specified string as a signed integer value using the specified radix. The ASCII character
  • toString
    Converts the specified signed integer into a string representation based on the specified radix. The
  • valueOf
    Parses the specified string as a signed integer value using the specified radix.
  • <init>
    Constructs a new Integer from the specified string.
  • toHexString
    Returns a string representation of the integer argument as an unsigned integer in base 16.The unsign
  • equals
    Compares this instance with the specified object and indicates if they are equal. In order to be equ
  • compareTo
    Compares this Integer object to another object. If the object is an Integer, this function behaves l
  • hashCode
  • compare
    Compares two int values.
  • longValue
    Returns the value of this Integer as along.
  • decode
    Parses the specified string and returns a Integer instance if the string can be decoded into an inte
  • numberOfLeadingZeros
    Determines the number of leading zeros in the specified integer prior to the #highestOneBit(int).
  • decode,
  • numberOfLeadingZeros,
  • getInteger,
  • doubleValue,
  • toBinaryString,
  • byteValue,
  • bitCount,
  • shortValue,
  • highestOneBit

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now