クラスjava.lang.Void
の使用
| パッケージ | 説明 |
|---|---|
| java.lang |
Javaプログラミング言語の設計にあたり基本的なクラスを提供します。
|
| java.net.http |
HTTPクライアントおよびWebSocket API
|
| java.nio.channels |
入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。
|
| java.util.concurrent |
並行プログラミングでよく使用されるユーティリティ・クラスです。
|
| javax.management.openmbean |
公開データ型とOpen MBean記述子クラスを提供します。
|
-
java.langでのVoidの使用
-
java.net.httpでのVoidの使用
型Voidの引数を持つ型を返すjava.net.httpのメソッド 修飾子と型 メソッド 説明 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<オプショナル<byte[]>> consumer)BodySubscribers.ofByteArrayConsumer(Consumer)から取得されたBodySubscriber<Void>を返すBodyHandler<Void>を返します。static HttpResponse.BodySubscriber<Void>HttpResponse.BodySubscribers. ofByteArrayConsumer(Consumer<オプショナル<byte[]>> consumer)提供されたOptional<byte[]>のコンシューマに着信する本文データを提供するBodySubscriberを返します。 -
java.nio.channelsでのVoidの使用
Void型の引数を持つ型を返すjava.nio.channelsのメソッド 修飾子と型 メソッド 説明 abstract Future<Void>AsynchronousSocketChannel. connect(SocketAddress remote)このチャネルを接続します。Void型の型引数を持つjava.nio.channelsのメソッド・パラメータ 修飾子と型 メソッド 説明 abstract <A> voidAsynchronousSocketChannel. connect(SocketAddress remote, A attachment, CompletionHandler<Void,? super A> handler)このチャネルを接続します。 -
java.util.concurrentでのVoidの使用
Voidを返すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 VoidRecursiveAction. getRawResult()常にnullを返します。Void型の引数を持つ型を返すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 CompletableFuture<Void>CompletableFuture. acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)CompletionStage<Void>CompletionStage. acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)このステージまたは指定された他のステージが正常に完了したときに、対応する結果を指定されたアクションへの引数に設定して実行される新しいCompletionStageを返します。CompletableFuture<Void>CompletableFuture. acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)CompletableFuture<Void>CompletableFuture. acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)CompletionStage<Void>CompletionStage. acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)このステージまたは指定された他のステージが正常に完了したときに、対応する結果を指定されたアクションへの引数に設定し、このステージのデフォルトの非同期実行機能を使用して実行される新しいCompletionStageを返します。CompletionStage<Void>CompletionStage. acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)指定されたステージが正常に完了したときに、指定されたステージのいずれかが正常に完了したときに、指定されたエグゼキュータを使用して実行され、対応する結果が指定されたアクションの引数として返される新しいCompletionStageを返します。static CompletableFuture<Void>CompletableFuture. allOf(CompletableFuture<?>... cfs)指定されたすべてのCompletableFutureが完了したときに完了する新しいCompletableFutureを返します。CompletableFuture<Void>SubmissionPublisher. consume(Consumer<? super T> consumer)指定したコンシューマ関数を使用して、公開されたすべてのアイテムを処理します。CompletableFuture<Void>CompletableFuture. runAfterBoth(CompletionStage<?> other, Runnable action)CompletionStage<Void>CompletionStage. runAfterBoth(CompletionStage<?> other, Runnable action)このステージと指定された他のステージの両方が正常に完了したときに指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture<Void>CompletableFuture. runAfterBothAsync(CompletionStage<?> other, Runnable action)CompletableFuture<Void>CompletableFuture. runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)CompletionStage<Void>CompletionStage. runAfterBothAsync(CompletionStage<?> other, Runnable action)これと他のステージが両方とも正常に完了したときに、このステージのデフォルトの非同期実行機能を使用して、指定されたアクションを実行する新しいCompletionStageを返します。CompletionStage<Void>CompletionStage. runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)これと他のステージが両方とも正常に完了した場合に、指定されたアクションを指定されたエグゼキュータを使用して実行する新しいCompletionStageを返します。CompletableFuture<Void>CompletableFuture. runAfterEither(CompletionStage<?> other, Runnable action)CompletionStage<Void>CompletionStage. runAfterEither(CompletionStage<?> other, Runnable action)このステージと指定された他のステージのどちらかが正常に完了したときに指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture<Void>CompletableFuture. runAfterEitherAsync(CompletionStage<?> other, Runnable action)CompletableFuture<Void>CompletableFuture. runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)CompletionStage<Void>CompletionStage. runAfterEitherAsync(CompletionStage<?> other, Runnable action)このステージと指定された他のステージのどちらかが正常に完了したときにこのステージのデフォルトの非同期実行機能を使用して指定されたアクションを実行する新しいCompletionStageを返します。CompletionStage<Void>CompletionStage. runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)このステージと指定された他のステージのどちらかが正常に完了したときに指定されたエグゼキュータを使用して指定されたアクションを実行する新しいCompletionStageを返します。static CompletableFuture<Void>CompletableFuture. runAsync(Runnable runnable)ForkJoinPool.commonPool()で実行されているタスクが指定されたアクションの実行後に非同期に完了する新しいCompletableFutureを返します。static CompletableFuture<Void>CompletableFuture. runAsync(Runnable runnable, Executor executor)指定されたexecutorで実行されているタスクが指定されたアクションの実行後に非同期に完了する新しいCompletableFutureを返します。CompletableFuture<Void>CompletableFuture. thenAccept(Consumer<? super T> action)CompletionStage<Void>CompletionStage. thenAccept(Consumer<? super T> action)このステージが正常に完了したときに、このステージの結果を指定されたアクションへの引数に設定して実行される新しいCompletionStageを返します。CompletableFuture<Void>CompletableFuture. thenAcceptAsync(Consumer<? super T> action)CompletableFuture<Void>CompletableFuture. thenAcceptAsync(Consumer<? super T> action, Executor executor)CompletionStage<Void>CompletionStage. thenAcceptAsync(Consumer<? super T> action)このステージが正常に完了したときに、このステージの結果を指定されたアクションへの引数に設定し、このステージのデフォルトの非同期実行機能を使用して実行される新しいCompletionStageを返します。CompletionStage<Void>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を返します。CompletableFuture<Void>CompletableFuture. thenRun(Runnable action)CompletionStage<Void>CompletionStage. thenRun(Runnable action)このステージが正常に完了したときに、指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture<Void>CompletableFuture. thenRunAsync(Runnable action)CompletableFuture<Void>CompletableFuture. thenRunAsync(Runnable action, Executor executor)CompletionStage<Void>CompletionStage. thenRunAsync(Runnable action)このステージが正常に完了したときに、このステージのデフォルトの非同期実行機能を使用して指定されたアクションを実行する新しいCompletionStageを返します。CompletionStage<Void>CompletionStage. thenRunAsync(Runnable action, Executor executor)このステージが正常に完了したときに指定されたExecutorを使用して指定されたアクションを実行する新しいCompletionStageを返します。Void型のパラメータを持つjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 protected voidRecursiveAction. setRawResult(Void mustBeNull)null完了値が必要です。 -
javax.management.openmbeanでのVoidの使用
Void型の型パラメータを持つjavax.management.openmbeanのフィールド 修飾子と型 フィールド 説明 static SimpleType<Void>SimpleType. VOIDJavaクラス名がjava.lang.Voidの値を記述するSimpleTypeインスタンスです。