クラスjava.lang.Void
の使用
パッケージ
説明
Javaプログラミング言語の設計にあたり基本的なクラスを提供します。
HTTPクライアントおよびWebSocket API
入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。
並行プログラミングでよく使用されるユーティリティ・クラスです。
公開データ型とOpen MBean記述子クラスを提供します。
-
java.langでのVoidの使用
-
java.net.httpでのVoidの使用
修飾子と型メソッド説明static HttpResponse.BodyHandler
<Void> HttpResponse.BodyHandlers.discarding()
レスポンス本文を破棄するレスポンス本文ハンドラを返します。static HttpResponse.BodySubscriber
<Void> HttpResponse.BodySubscribers.discarding()
レスポンス本文を破棄するレスポンス・サブスクライバを返します。static HttpResponse.BodyHandler
<Void> HttpResponse.BodyHandlers.fromLineSubscriber
(Flow.Subscriber<? super String> subscriber) 指定されたBodySubscribers.fromLineSubscriber(subscriber, s -> null, charset, null)
から取得されたBodySubscriber
<Void>
を返すレスポンス本文ハンドラを返します。static HttpResponse.BodySubscriber
<Void> HttpResponse.BodySubscribers.fromLineSubscriber
(Flow.Subscriber<? super String> subscriber) 指定されたFlow.Subscriber
の行ごとにすべてのレスポンス本文を転送する本体サブスクライバを返します。static HttpResponse.BodyHandler
<Void> HttpResponse.BodyHandlers.fromSubscriber
(Flow.Subscriber<? super List<ByteBuffer>> subscriber) 指定されたHttpResponse.BodySubscribers.fromSubscriber(Subscriber)
から取得されたBodySubscriber
<Void>
を返すレスポンス本文ハンドラを返します。static HttpResponse.BodySubscriber
<Void> HttpResponse.BodySubscribers.fromSubscriber
(Flow.Subscriber<? super List<ByteBuffer>> subscriber) すべてのレスポンス本文を指定されたFlow.Subscriber
に転送する本文サブスクライバを返します。static HttpResponse.BodyHandler
<Void> HttpResponse.BodyHandlers.ofByteArrayConsumer
(Consumer<Optional<byte[]>> consumer) BodySubscribers.ofByteArrayConsumer(Consumer)
から取得されたBodySubscriber
<Void>
を返すBodyHandler<Void>
を返します。static HttpResponse.BodySubscriber
<Void> HttpResponse.BodySubscribers.ofByteArrayConsumer
(Consumer<Optional<byte[]>> consumer) 提供されたOptional<byte[]>
のコンシューマに着信する本文データを提供するBodySubscriber
を返します。 -
java.nio.channelsでのVoidの使用
修飾子と型メソッド説明abstract <A> void
AsynchronousSocketChannel.connect
(SocketAddress remote, A attachment, CompletionHandler<Void, ? super A> handler) このチャネルを接続します。 -
java.util.concurrentでのVoidの使用
修飾子と型メソッド説明CompletableFuture.acceptEither
(CompletionStage<? extends T> other, Consumer<? super T> action) CompletionStage.acceptEither
(CompletionStage<? extends T> other, Consumer<? super T> action) このステージまたは指定された他のステージが正常に完了したときに、対応する結果を指定されたアクションへの引数に設定して実行される新しいCompletionStageを返します。CompletableFuture.acceptEitherAsync
(CompletionStage<? extends T> other, Consumer<? super T> action) CompletableFuture.acceptEitherAsync
(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor) CompletionStage.acceptEitherAsync
(CompletionStage<? extends T> other, Consumer<? super T> action) このステージまたは指定された他のステージが正常に完了したときに、対応する結果を指定されたアクションへの引数に設定し、このステージのデフォルトの非同期実行機能を使用して実行される新しいCompletionStageを返します。CompletionStage.acceptEitherAsync
(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor) このステージまたは指定されたステージのいずれかが正常に完了したときに、指定されたエグゼキュータを使用して実行され、対応する結果が指定されたアクションの引数として実行される新しいCompletionStageを返します。static CompletableFuture
<Void> CompletableFuture.allOf
(CompletableFuture<?>... cfs) 指定されたすべてのCompletableFutureが完了したときに完了する新しいCompletableFutureを返します。指定されたコンシューマ機能を使用して、すべての公開済項目を処理します。CompletableFuture.runAfterBoth
(CompletionStage<?> other, Runnable action) CompletionStage.runAfterBoth
(CompletionStage<?> other, Runnable action) このステージと指定された他のステージの両方が正常に完了したときに指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture.runAfterBothAsync
(CompletionStage<?> other, Runnable action) CompletableFuture.runAfterBothAsync
(CompletionStage<?> other, Runnable action, Executor executor) CompletionStage.runAfterBothAsync
(CompletionStage<?> other, Runnable action) このステージと他の指定されたステージの両方が正常に完了すると、このステージのデフォルトの非同期実行機能を使用して指定されたアクションを実行する、新しいCompletionStageを返します。CompletionStage.runAfterBothAsync
(CompletionStage<?> other, Runnable action, Executor executor) このステージと他の指定されたステージの両方が正常に完了すると、指定されたエグゼキュータを使用して指定されたアクションを実行する、新しいCompletionStageを返します。CompletableFuture.runAfterEither
(CompletionStage<?> other, Runnable action) CompletionStage.runAfterEither
(CompletionStage<?> other, Runnable action) このステージと指定された他のステージのどちらかが正常に完了したときに指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture.runAfterEitherAsync
(CompletionStage<?> other, Runnable action) CompletableFuture.runAfterEitherAsync
(CompletionStage<?> other, Runnable action, Executor executor) CompletionStage.runAfterEitherAsync
(CompletionStage<?> other, Runnable action) このステージと指定された他のステージのどちらかが正常に完了したときにこのステージのデフォルトの非同期実行機能を使用して指定されたアクションを実行する新しいCompletionStageを返します。CompletionStage.runAfterEitherAsync
(CompletionStage<?> other, Runnable action, Executor executor) このステージと指定された他のステージのどちらかが正常に完了したときに指定されたエグゼキュータを使用して指定されたアクションを実行する新しいCompletionStageを返します。static CompletableFuture
<Void> ForkJoinPool.commonPool()
で実行されているタスクが指定されたアクションの実行後に非同期に完了する新しいCompletableFutureを返します。static CompletableFuture
<Void> 指定されたexecutorで実行されているタスクが指定されたアクションの実行後に非同期に完了する新しいCompletableFutureを返します。CompletableFuture.thenAccept
(Consumer<? super T> action) CompletionStage.thenAccept
(Consumer<? super T> action) このステージが正常に完了したときに、このステージの結果を指定されたアクションへの引数に設定して実行される新しいCompletionStageを返します。CompletableFuture.thenAcceptAsync
(Consumer<? super T> action) CompletableFuture.thenAcceptAsync
(Consumer<? super T> action, Executor executor) CompletionStage.thenAcceptAsync
(Consumer<? super T> action) このステージが正常に完了したときに、このステージの結果を指定されたアクションへの引数に設定し、このステージのデフォルトの非同期実行機能を使用して実行される新しいCompletionStageを返します。CompletionStage.thenAcceptAsync
(Consumer<? super T> action, Executor executor) このステージが正常に完了したときに、このステージの結果を指定されたアクションへの引数に設定し、指定されたエグゼキュータを使用して実行される新しいCompletionStageを返します。<U> CompletableFuture
<Void> CompletableFuture.thenAcceptBoth
(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) <U> CompletionStage
<Void> CompletionStage.thenAcceptBoth
(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) このステージと指定された他のステージの両方が正常終了した際に実行される新しいCompletionStageを返します(実行時には、指定されたアクションの引数として2つの結果が使用される)。<U> CompletableFuture
<Void> CompletableFuture.thenAcceptBothAsync
(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) <U> CompletableFuture
<Void> CompletableFuture.thenAcceptBothAsync
(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor) <U> CompletionStage
<Void> CompletionStage.thenAcceptBothAsync
(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) このステージと他の指定されたステージの両方が正常に完了すると、このステージのデフォルトの非同期実行機能を使用して実行され、2つの結果が指定されたアクションの引数として使用される、新しいCompletionStageを返します。<U> CompletionStage
<Void> CompletionStage.thenAcceptBothAsync
(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor) このステージと他の指定されたステージの両方が正常に完了すると、指定されたエグゼキュータを使用して実行され、2つの結果が指定されたアクションの引数として実行される新しいCompletionStageを返します。このステージが正常に完了したときに、指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture.thenRunAsync
(Runnable action) CompletableFuture.thenRunAsync
(Runnable action, Executor executor) CompletionStage.thenRunAsync
(Runnable action) このステージが正常に完了したときに、このステージのデフォルトの非同期実行機能を使用して指定されたアクションを実行する新しいCompletionStageを返します。CompletionStage.thenRunAsync
(Runnable action, Executor executor) このステージが正常に完了したときに指定されたExecutorを使用して指定されたアクションを実行する新しいCompletionStageを返します。 -
javax.management.openmbeanでのVoidの使用
修飾子と型フィールド説明static final SimpleType
<Void> SimpleType.VOID
Javaクラス名がjava.lang.Void
の値を記述するSimpleType
インスタンスです。