Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adc6b850 authored by Scott Kennedy's avatar Scott Kennedy
Browse files

Add @Nullable annotation where necessary in Rfc822Token

Change-Id: I9b3088cbdfa09a8085b525674ff2540f23d4c96e
parent f28f5cec
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -16,18 +16,21 @@

package android.text.util;

import android.annotation.Nullable;

/**
 * This class stores an RFC 822-like name, address, and comment,
 * and provides methods to convert them to quoted strings.
 */
public class Rfc822Token {
    @Nullable
    private String mName, mAddress, mComment;

    /**
     * Creates a new Rfc822Token with the specified name, address,
     * and comment.
     */
    public Rfc822Token(String name, String address, String comment) {
    public Rfc822Token(@Nullable String name, @Nullable String address, @Nullable String comment) {
        mName = name;
        mAddress = address;
        mComment = comment;
@@ -36,6 +39,7 @@ public class Rfc822Token {
    /**
     * Returns the name part.
     */
    @Nullable
    public String getName() {
        return mName;
    }
@@ -43,6 +47,7 @@ public class Rfc822Token {
    /**
     * Returns the address part.
     */
    @Nullable
    public String getAddress() {
        return mAddress;
    }
@@ -50,6 +55,7 @@ public class Rfc822Token {
    /**
     * Returns the comment part.
     */
    @Nullable
    public String getComment() {
        return mComment;
    }
@@ -57,21 +63,21 @@ public class Rfc822Token {
    /**
     * Changes the name to the specified name.
     */
    public void setName(String name) {
    public void setName(@Nullable String name) {
        mName = name;
    }

    /**
     * Changes the address to the specified address.
     */
    public void setAddress(String address) {
    public void setAddress(@Nullable String address) {
        mAddress = address;
    }

    /**
     * Changes the comment to the specified comment.
     */
    public void setComment(String comment) {
    public void setComment(@Nullable String comment) {
        mComment = comment;
    }