car/app/app/src/main/java/androidx/car/app/model/Header.java
/**
         * Constructs the component defined by this builder.
         *
         * <h4>Requirements</h4>
         *
         * <p>Either a start header {@link Action} or title must be set on the component.
         *
         * @throws IllegalStateException    if neither a title nor start header {@link Action} is
         *                                  set
         * @throws IllegalArgumentException if {@link Action}s towards the end of the header do not
         *                                  meet the template's requirements
         */
Constructs the component defined by this builder.
Requirements

Either a start header  Action or title must be set on the component.

@throws IllegalStateException    if neither a title nor start header  Action is
set
@throws IllegalArgumentException if  Actions towards the end of the header do not
meet the template's requirements
Constructs the component defined by this builder . Requirements Either a start header Action or title must be set on the component . @throws IllegalStateException if neither a title nor start header Action is set @throws IllegalArgumentException if Actions towards the end of the header do not meet the template ' s requirements
@NonNull
        public Header build() {
            ACTIONS_CONSTRAINTS_MULTI_HEADER.validateOrThrow(mEndHeaderActions);
            if (CarText.isNullOrEmpty(mTitle) && mStartHeaderAction == null) {
                throw new IllegalStateException("Either the title or start header action must be "
                        + "set");
            }
            return new Header(this);
        }
@ NonNull public Header build ( ) { ACTIONS_CONSTRAINTS_MULTI_HEADER . validateOrThrow ( mEndHeaderActions ) ; if ( CarText . isNullOrEmpty ( mTitle ) && mStartHeaderAction == null ) { throw new IllegalStateException ( "Either the title or start header action must be " + "set" ) ; } return new Header ( this ) ; }
Constructs the component defined by this builder.
Constructs the component defined by this builder .