Example usage for java.util Objects requireNonNull

List of usage examples for java.util Objects requireNonNull

Introduction

In this page you can find the example usage for java.util Objects requireNonNull.

Prototype

public static <T> T requireNonNull(T obj) 

Source Link

Document

Checks that the specified object reference is not null .

Usage

From source file:org.eclipse.hono.event.impl.EventEndpoint.java

/**
 * Creates a new endpoint.//from   ww w  . j a  v  a  2  s.c  o  m
 * 
 * @param vertx The Vert.x instance to run on.
 */
@Autowired
public EventEndpoint(final Vertx vertx) {
    super(Objects.requireNonNull(vertx));
}

From source file:org.elasticsearch.discovery.ec2.AmazonEC2Fixture.java

private AmazonEC2Fixture(final String workingDir, final String nodesUriPath) {
    super(workingDir);
    this.nodes = toPath(Objects.requireNonNull(nodesUriPath));
}

From source file:com.avanza.ymer.MongoQueryFactory.java

/**
 * @param mongoConverter {@link MongoConverter} extracted from the mongo datasource used in gigaspaces
 *///w ww  . j  av a  2s. co  m
public MongoQueryFactory(MongoConverter mongoConverter) {
    this.mongoConverter = Objects.requireNonNull(mongoConverter);
    this.mongoMappingContext = (MongoMappingContext) mongoConverter.getMappingContext();
}

From source file:org.eclipse.hono.telemetry.impl.TelemetryEndpoint.java

/**
 * Creates a new endpoint./*from   w w w.ja  v  a 2  s.c  o  m*/
 * 
 * @param vertx The Vert.x instance to run on.
 */
@Autowired
public TelemetryEndpoint(final Vertx vertx) {
    super(Objects.requireNonNull(vertx));
}

From source file:org.eclipse.hono.service.tenant.TenantAmqpEndpoint.java

/**
 * Creates a new tenant endpoint for a vertx instance.
 *
 * @param vertx The vertx instance to use.
 *///from w ww .ja  v  a2 s. co  m
@Autowired
public TenantAmqpEndpoint(final Vertx vertx) {
    super(Objects.requireNonNull(vertx));
}

From source file:org.trustedanalytics.servicecatalog.service.ApplicationsService.java

@Autowired
public ApplicationsService(CcOperations ccClient) {
    this.ccOperations = Objects.requireNonNull(ccClient);
}

From source file:at.gridtec.lambda4j.generator.util.LambdaUtils.java

/**
 * Returns a deep copy of the given lambda.
 *
 * @param lambda The lambda to be copied
 * @return A deep copy of the given lambda.
 * @throws NullPointerException If given lambda is {@code null}
 *//*from   w  w  w  .  ja va  2  s.  co  m*/
public static LambdaEntity copy(@Nonnull final LambdaEntity lambda) {
    Objects.requireNonNull(lambda);
    return SerializationUtils.clone(lambda);
}

From source file:com.floragunn.searchguard.tools.Hasher.java

public static String hash(final byte[] clearTextPassword) {
    return BCrypt.hashpw(Objects.requireNonNull(clearTextPassword), BCrypt.gensalt(12));
}

From source file:io.fluo.webindex.core.models.URL.java

public URL(String domain, String host, String path, int port, boolean secure, boolean ipHost) {
    Objects.requireNonNull(domain);
    Objects.requireNonNull(host);
    Objects.requireNonNull(path);
    this.domain = domain;
    this.host = host;
    this.path = path;
    this.port = port;
    this.secure = secure;
    this.ipHost = ipHost;
}

From source file:com.javacreed.examples.akka.internal.SpringActorProducer.java

/**
 * //from w  ww  .  ja v a  2  s .c o  m
 * @param applicationContext
 *          the spring application context (which will not be {@code null})
 * @param actorBeanName
 *          the actor bean name (which will not be {@code null})
 * @throws NullPointerException
 *           if any of the parameters is {@code null}
 */
public SpringActorProducer(final ApplicationContext applicationContext, final String actorBeanName)
        throws NullPointerException {
    this.applicationContext = Objects.requireNonNull(applicationContext);
    this.actorBeanName = Objects.requireNonNull(actorBeanName);
}