io.vertx.codegen.annotations.Nullable Java Examples
The following examples show how to use
io.vertx.codegen.annotations.Nullable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 5 votes |
@Override public Set<@Nullable Float> methodWithSetNullableFloatReturn() { LinkedHashSet<Float> ret = new LinkedHashSet<>(); ret.add(1.1f); ret.add(null); ret.add(3.3f); return ret; }
Example #2
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 5 votes |
@Override public @Nullable Map<String, Double> methodWithNullableMapDoubleReturn(boolean notNull) { if (notNull) { return map(1.11d, 2.22d, 3.33d); } else { return null; } }
Example #3
Source File: MongoClientImpl.java From vertx-mongo-client with Apache License 2.0 | 5 votes |
@Override public Future<@Nullable MongoClientDeleteResult> removeDocumentsWithOptions(String collection, JsonObject query, @Nullable WriteOption writeOption) { requireNonNull(collection, "collection cannot be null"); requireNonNull(query, "query cannot be null"); MongoCollection<JsonObject> coll = getCollection(collection, writeOption); Bson bquery = wrap(encodeKeyWhenUseObjectId(query)); Promise<DeleteResult> promise = vertx.promise(); coll.deleteMany(bquery).subscribe(new SingleResultSubscriber<>(promise)); return promise.future().map(Utils::toMongoClientDeleteResult); }
Example #4
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 5 votes |
@Override public @Nullable Map<String, Float> methodWithNullableMapFloatReturn(boolean notNull) { if (notNull) { return map(1.1f, 2.2f, 3.3f); } else { return null; } }
Example #5
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 5 votes |
@Override public List<@Nullable TestGenEnum> methodWithListNullableGenEnumReturn() { ArrayList<TestGenEnum> ret = new ArrayList<>(); ret.add(TestGenEnum.BOB); ret.add(null); ret.add(TestGenEnum.LELAND); return ret; }
Example #6
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 5 votes |
@Override public @Nullable Map<String, Boolean> methodWithNullableMapBooleanReturn(boolean notNull) { if (notNull) { return map(true, false, true); } else { return null; } }
Example #7
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 5 votes |
@Override public List<@Nullable Integer> methodWithListNullableIntegerReturn() { ArrayList<Integer> ret = new ArrayList<>(); ret.add(12345); ret.add(null); ret.add(54321); return ret; }
Example #8
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/dump">dump</a>. * @return fluent self */ @Fluent default RedisAPI dump(String arg0, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.DUMP, arg0).onComplete(handler); return this; }
Example #9
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithNullableSetCharHandler(boolean notNull, Handler<@Nullable Set<Character>> handler) { handler.handle(methodWithNullableSetCharReturn(notNull)); }
Example #10
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithSetNullableGenEnumHandler(Handler<Set<@Nullable TestGenEnum>> handler) { handler.handle(methodWithSetNullableGenEnumReturn()); }
Example #11
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithSetNullableJsonObjectParam(Set<@Nullable JsonObject> param) { assertEquals(param, methodWithSetNullableJsonObjectReturn()); }
Example #12
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/zrangebyscore">zrangebyscore</a>. * @return fluent self */ @Fluent default RedisAPI zrangebyscore(List<String> args, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.ZRANGEBYSCORE, args.toArray(new String[0])).onComplete(handler); return this; }
Example #13
Source File: OAuth2Response.java From vertx-auth with Apache License 2.0 | 4 votes |
@Override public @Nullable JsonArray jsonArray() { return new JsonArray(body); }
Example #14
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/swapdb">swapdb</a>. * @return fluent self */ @Fluent default RedisAPI swapdb(String arg0, String arg1, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.SWAPDB, arg0, arg1).onComplete(handler); return this; }
Example #15
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithListNullableLongHandler(Handler<List<@Nullable Long>> handler) { handler.handle(methodWithListNullableLongReturn()); }
Example #16
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/exists">exists</a>. * @return fluent self */ @Fluent default RedisAPI exists(List<String> args, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.EXISTS, args.toArray(new String[0])).onComplete(handler); return this; }
Example #17
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithListNullableBooleanHandlerAsyncResult(Handler<AsyncResult<List<@Nullable Boolean>>> handler) { handler.handle(Future.succeededFuture(methodWithListNullableBooleanReturn())); }
Example #18
Source File: RequestParameterImpl.java From vertx-web with Apache License 2.0 | 4 votes |
@Override public @Nullable Buffer getBuffer() { return isBuffer() ? (Buffer) value : null; }
Example #19
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/hincrby">hincrby</a>. * @return fluent self */ @Fluent default RedisAPI hincrby(String arg0, String arg1, String arg2, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.HINCRBY, arg0, arg1, arg2).onComplete(handler); return this; }
Example #20
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/linsert">linsert</a>. * @return fluent self */ @Fluent default RedisAPI linsert(String arg0, String arg1, String arg2, String arg3, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.LINSERT, arg0, arg1, arg2, arg3).onComplete(handler); return this; }
Example #21
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/incrby">incrby</a>. * @return fluent self */ @Fluent default RedisAPI incrby(String arg0, String arg1, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.INCRBY, arg0, arg1).onComplete(handler); return this; }
Example #22
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithListNullableCharHandlerAsyncResult(Handler<AsyncResult<List<@Nullable Character>>> handler) { handler.handle(Future.succeededFuture(methodWithListNullableCharReturn())); }
Example #23
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithNullableSetJsonObjectHandler(boolean notNull, Handler<@Nullable Set<JsonObject>> handler) { handler.handle(methodWithNullableSetJsonObjectReturn(notNull)); }
Example #24
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithNullableListShortHandlerAsyncResult(boolean notNull, Handler<AsyncResult<@Nullable List<Short>>> handler) { handler.handle(Future.succeededFuture(methodWithNullableListShortReturn(notNull))); }
Example #25
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public @Nullable Byte methodWithNullableByteReturn(boolean notNull) { return notNull ? (byte)67 : null; }
Example #26
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/hlen">hlen</a>. * @return fluent self */ @Fluent default RedisAPI hlen(String arg0, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.HLEN, arg0).onComplete(handler); return this; }
Example #27
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/config">config</a>. * @return fluent self */ @Fluent default RedisAPI config(List<String> args, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.CONFIG, args.toArray(new String[0])).onComplete(handler); return this; }
Example #28
Source File: RedisAPI.java From vertx-redis-client with Apache License 2.0 | 4 votes |
/** * Redis command <a href="https://redis.io/commands/post">post</a>. * @return fluent self */ @Fluent default RedisAPI post(List<String> args, Handler<AsyncResult<@Nullable Response>> handler) { send(Command.POST, args.toArray(new String[0])).onComplete(handler); return this; }
Example #29
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithNullableMapShortHandler(boolean notNull, Handler<@Nullable Map<String, Short>> handler) { handler.handle(methodWithNullableMapShortReturn(notNull)); }
Example #30
Source File: NullableTCKImpl.java From vertx-codegen with Apache License 2.0 | 4 votes |
@Override public void methodWithSetNullableJsonObjectHandlerAsyncResult(Handler<AsyncResult<Set<@Nullable JsonObject>>> handler) { handler.handle(Future.succeededFuture(methodWithSetNullableJsonObjectReturn())); }