From f8f2af7d5e7c6f91918bf9208ffc6f9e57b4bd2e Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 20 Dec 2022 15:57:11 +0100 Subject: [PATCH] Add javadoc for UserId.parse() --- .../java/org/pgpainless/key/util/UserId.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java b/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java index 6dca06b5..3c43b92c 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java @@ -69,6 +69,24 @@ public final class UserId implements CharSequence { } } + /** + * Parse a {@link UserId} from free-form text,
name-addr
or
mailbox
string and split it + * up into its components. + * Example inputs for this method: + * + * In these cases, {@link #parse(String)} will detect email addresses, names and comments and expose those + * via the respective getters. + * + * @see RFC5322 ยง3.4. Address Specification + * @param string user-id + * @return parsed {@link UserId} object + */ public static UserId parse(@Nonnull String string) { Builder builder = newBuilder(); string = string.trim();