Tabnine Logo
NullArgumentException.checkNotNull
Code IndexAdd Tabnine to your IDE (free)

How to use
checkNotNull
method
in
com.aoindustries.lang.NullArgumentException

Best Java code snippets using com.aoindustries.lang.NullArgumentException.checkNotNull (Showing top 19 results out of 315)

origin: com.aoindustries/ao-lang

/**
 * Checks an argument and throws an exception if null.
 */
public static <T> T checkNotNull(T argument) throws NullArgumentException {
  return checkNotNull(argument, null);
}
origin: com.aoindustries/ao-lang

public LocaleString(Locale locale, String value) {
  this.locale = NullArgumentException.checkNotNull(locale, "locale");
  this.value = NullArgumentException.checkNotNull(value, "value");
}
origin: com.aoindustries/ao-firewalld

ProtocolOrPortRange(Protocol protocol) {
  this.protocol = NullArgumentException.checkNotNull(protocol, "protocol");
  this.portRange = null;
}
origin: com.semanticcms/semanticcms-core-servlet

/**
 * Gets the current page index setup by a combined view or <code>null</code>
 * if not doing a combined view.
 */
public static PageIndex getCurrentPageIndex(ServletRequest request) {
  NullArgumentException.checkNotNull(request, "request");
  return (PageIndex)request.getAttribute(PAGE_INDEX_REQUEST_ATTRIBUTE_NAME);
}
origin: com.aoindustries/ao-firewalld

/**
 * Gets the destination for the given {@link AddressFamily}.
 */
public InetAddressPrefix getDestination(AddressFamily addressFamily) {
  NullArgumentException.checkNotNull(addressFamily);
  switch(addressFamily) {
    case INET  : return destinationIPv4;
    case INET6 : return destinationIPv6;
    default : throw new AssertionError(addressFamily);
  }
}
origin: com.aoindustries/aocode-public

  @Override
  public void addParameter(String name, String value) {
    NullArgumentException.checkNotNull(name, "name");
    NullArgumentException.checkNotNull(value, "value");
    List<String> values = map.get(name);
    if(values==null) map.put(name, values = new ArrayList<String>());
    values.add(value);
  }
}
origin: com.aoindustries/ao-firewalld

ProtocolOrPortRange(Protocol protocol, IPortRange portRange) {
  this.protocol = NullArgumentException.checkNotNull(protocol, "protocol");
  this.portRange = portRange;
  assert portRange == null || portRange.getProtocol() == protocol;
}
origin: com.aoindustries/ao-firewalld

/**
 * @param destination  The destination is {@link InetAddressPrefix#normalize() normalized}
 */
Target(InetAddressPrefix destination, ProtocolOrPortRange protocolOrPortRange) {
  this.destination = NullArgumentException.checkNotNull(destination, "destination");
  assert destination == destination.normalize();
  this.protocolOrPortRange = protocolOrPortRange;
}
origin: com.aoindustries/ao-firewalld

/**
 * Parses a protocol value compatible with <code>/etc/protocols</code>.
 */
static Protocol parseProtocol(String protocol) throws IllegalArgumentException {
  NullArgumentException.checkNotNull(protocol);
  // This might need some other type of conversion.  Do as-needed.
  Protocol p = Protocol.getProtocolByKeyword(protocol);
  if(p == null) throw new IllegalArgumentException("Protocol not found: " + protocol);
  return p;
}
origin: com.aoindustries/ao-firewalld

ProtocolOrPortRange(IPortRange portRange) {
  this.portRange = NullArgumentException.checkNotNull(portRange, "portRange");
  this.protocol = portRange.getProtocol();
}
origin: com.aoindustries/aocode-public

/**
 * Parses a version number from its string representation.
 *
 * @see  #toString()
 */
public static Version valueOf(String version) throws IllegalArgumentException {
  NullArgumentException.checkNotNull(version, "version");
  int dot1Pos = version.indexOf('.');
  if(dot1Pos==-1) throw new IllegalArgumentException(version);
  int dot2Pos = version.indexOf('.', dot1Pos+1);
  if(dot2Pos==-1) throw new IllegalArgumentException(version);
  int dot3Pos = version.indexOf('.', dot2Pos+1);
  if(dot3Pos==-1) throw new IllegalArgumentException(version);
  return getInstance(
    Integer.parseInt(version.substring(0, dot1Pos)),
    Integer.parseInt(version.substring(dot1Pos+1, dot2Pos)),
    Integer.parseInt(version.substring(dot2Pos+1, dot3Pos)),
    Integer.parseInt(version.substring(dot3Pos+1))
  );
}
origin: com.semanticcms/semanticcms-core-servlet

public void setCapturedPage(Page capturedPage) {
  NullArgumentException.checkNotNull(capturedPage, "page");
  if(this.capturedPage != null) {
    throw new IllegalStateException(
      "Cannot capture more than one page: first page="
      + this.capturedPage.getPageRef()
      + ", second page=" + capturedPage.getPageRef()
    );
  }
  this.capturedPage = capturedPage;
}
origin: com.aoindustries/ao-firewalld

/**
 * @param destination  The destination is {@link InetAddressPrefix#normalize() normalized}
 */
public Target(InetAddressPrefix destination, IPortRange portRange) {
  this.destination = NullArgumentException.checkNotNull(destination, "destination").normalize();
  this.protocolOrPortRange = new ProtocolOrPortRange(portRange);
}
origin: com.aoindustries/ao-firewalld

/**
 * @param destination  The destination is {@link InetAddressPrefix#normalize() normalized}
 */
public Target(InetAddressPrefix destination, Protocol protocol) {
  this.destination = NullArgumentException.checkNotNull(destination, "destination").normalize();
  this.protocolOrPortRange = new ProtocolOrPortRange(protocol);
}
origin: com.aoindustries/aocode-public

  && !relativeUrlPath.startsWith("cid:")
) {
  NullArgumentException.checkNotNull(servletPath, "servletPath");
  int slashPos = servletPath.lastIndexOf('/');
  if(slashPos==-1) throw new MalformedURLException("No slash found in servlet path: "+servletPath);
origin: com.aoindustries/aoserv-client

LinuxGroup getPrimaryGroup(LinuxAccount account) throws IOException, SQLException {
  NullArgumentException.checkNotNull(account, "account");
  synchronized(primaryHash) {
origin: com.aoindustries/ao-firewalld

  InetAddressPrefix destinationIPv6
) {
  this.name = NullArgumentException.checkNotNull(name, "name");
  this.version = version==null || version.isEmpty() ? null : version;
  this.shortName = shortName==null || shortName.isEmpty() ? null : shortName;
origin: com.semanticcms/semanticcms-core-servlet

NullArgumentException.checkNotNull(path, "path");
if(path.isEmpty()) throw new IllegalArgumentException("path is empty");
SemanticCMS semanticCMS = SemanticCMS.getInstance(servletContext);
origin: com.semanticcms/semanticcms-core-servlet

  Cache cache
) throws ServletException, IOException {
  NullArgumentException.checkNotNull(level, "level");
  PageRef pageRef = pageReferrer.getPageRef();
com.aoindustries.langNullArgumentExceptioncheckNotNull

Javadoc

Checks an argument and throws an exception if null.

Popular methods of NullArgumentException

  • <init>

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for WebStorm
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