Tabnine Logo
IllegalArgumentException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
java.lang.IllegalArgumentException
constructor

Best Java code snippets using java.lang.IllegalArgumentException.<init> (Showing top 20 results out of 291,204)

origin: stackoverflow.com

 if (string.contains("-")) {
  // Split it.
} else {
  throw new IllegalArgumentException("String " + string + " does not contain -");
}
origin: iluwatar/java-design-patterns

@Override
public void onPreCall() {
 if (n < 0) {
  throw new IllegalArgumentException("n is less than 0");
 }
}
origin: ReactiveX/RxJava

  @Override
  public boolean test(Integer t) throws Exception {
    throw new IllegalArgumentException();
  }
});
origin: ReactiveX/RxJava

  @Override
  public Integer apply(Integer t1) {
    throw new IllegalArgumentException("some error");
  }
}).blockingSingle();
origin: ReactiveX/RxJava

  @Override
  public Integer apply(Integer t1) {
    throw new IllegalArgumentException("some error");
  }
});
origin: ReactiveX/RxJava

  @Override
  public void run() throws Exception {
    throw new IllegalArgumentException();
  }
}));
origin: ReactiveX/RxJava

  @SuppressWarnings("unchecked")
  @Override
  public R apply(Object[] a) throws Exception {
    if (a.length != 2) {
      throw new IllegalArgumentException("Array of size 2 expected but got " + a.length);
    }
    return f.apply((T1)a[0], (T2)a[1]);
  }
}
origin: ReactiveX/RxJava

  @SuppressWarnings("unchecked")
  @Override
  public R apply(Object[] a) throws Exception {
    if (a.length != 5) {
      throw new IllegalArgumentException("Array of size 5 expected but got " + a.length);
    }
    return f.apply((T1)a[0], (T2)a[1], (T3)a[2], (T4)a[3], (T5)a[4]);
  }
}
origin: ReactiveX/RxJava

/**
 * Validates that the n is positive.
 * @param n the request amount
 * @return false if n is non-positive.
 */
public static boolean validate(long n) {
  if (n <= 0) {
    RxJavaPlugins.onError(new IllegalArgumentException("n > 0 required but it was " + n));
    return false;
  }
  return true;
}
origin: ReactiveX/RxJava

  @Override
  public boolean test(Integer t) throws Exception {
    throw new IllegalArgumentException();
  }
});
origin: ReactiveX/RxJava

  @Override
  public Integer apply(Integer arg0) {
    throw new IllegalArgumentException("any error");
  }
}).blockingSingle();
origin: ReactiveX/RxJava

  @Override
  public String apply(String arg0) {
    throw new IllegalArgumentException("any error");
  }
});
origin: ReactiveX/RxJava

  @Override
  public Integer apply(Integer t1) {
    throw new IllegalArgumentException("some error");
  }
});
origin: ReactiveX/RxJava

  @Override
  public Flowable apply(Flowable f) throws Exception {
    throw new IllegalArgumentException();
  }
});
origin: ReactiveX/RxJava

  @Override
  protected void subscribeActual(Subscriber<? super Integer> s) {
    throw new IllegalArgumentException();
  }
}
origin: ReactiveX/RxJava

  @Override
  public void accept(TestObserver<Integer> f) throws Exception {
    throw new IllegalArgumentException();
  }
});
origin: ReactiveX/RxJava

  @SuppressWarnings("unchecked")
  @Override
  public R apply(Object[] a) throws Exception {
    if (a.length != 4) {
      throw new IllegalArgumentException("Array of size 4 expected but got " + a.length);
    }
    return f.apply((T1)a[0], (T2)a[1], (T3)a[2], (T4)a[3]);
  }
}
origin: ReactiveX/RxJava

  @SuppressWarnings("unchecked")
  @Override
  public R apply(Object[] a) throws Exception {
    if (a.length != 3) {
      throw new IllegalArgumentException("Array of size 3 expected but got " + a.length);
    }
    return f.apply((T1)a[0], (T2)a[1], (T3)a[2]);
  }
}
origin: ReactiveX/RxJava

@Test
public void testErrorObservable() {
  TestSubscriber<String> subscriber = TestSubscriber.create();
  IllegalArgumentException error = new IllegalArgumentException("Error");
  Completable cmp = Flowable.<String>error(error).ignoreElements();
  cmp.<String>toFlowable().subscribe(subscriber);
  subscriber.assertError(error);
  subscriber.assertNoValues();
}
origin: ReactiveX/RxJava

@Test
public void testBackpressureWithError() {
  TestSubscriber<Notification<Integer>> ts = new TestSubscriber<Notification<Integer>>(0L);
  Flowable.<Integer> error(new IllegalArgumentException()).materialize().subscribe(ts);
  ts.assertNoValues();
  ts.request(1);
  ts.assertValueCount(1);
  ts.assertComplete();
}
java.langIllegalArgumentException<init>

Javadoc

Constructs an IllegalArgumentException with no detail message.

Popular methods of IllegalArgumentException

  • getMessage
  • printStackTrace
  • initCause
  • toString
  • getLocalizedMessage
  • getStackTrace
  • setStackTrace
  • getCause
  • addSuppressed
  • fillInStackTrace
  • getSuppressed
  • getSuppressed

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JList (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • CodeWhisperer alternatives
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