public final class

UserAgentMetadata.BrandVersion.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.webkit.UserAgentMetadata.BrandVersion.Builder

Overview

Builder used to create UserAgentMetadata.BrandVersion objects.

Examples:

  // Create a setting with a brand version contains brand name: myBrand,
  // major version: 100, full version: 100.1.1.1.
  new BrandVersion.Builder().setBrand("myBrand")
                            .setMajorVersion("100")
                            .setFullVersion("100.1.1.1")
                            .build();
 

Summary

Constructors
publicBuilder()

Create an empty BrandVersion Builder.

publicBuilder(UserAgentMetadata.BrandVersion brandVersion)

Create a BrandVersion Builder from an existing BrandVersion object.

Methods
public UserAgentMetadata.BrandVersionbuild()

Builds the current brand, majorVersion and fullVersion into a BrandVersion object.

public UserAgentMetadata.BrandVersion.BuildersetBrand(java.lang.String brand)

Sets the BrandVersion's brand.

public UserAgentMetadata.BrandVersion.BuildersetFullVersion(java.lang.String fullVersion)

Sets the BrandVersion's fullVersion.

public UserAgentMetadata.BrandVersion.BuildersetMajorVersion(java.lang.String majorVersion)

Sets the BrandVersion's majorVersion.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Create an empty BrandVersion Builder.

public Builder(UserAgentMetadata.BrandVersion brandVersion)

Create a BrandVersion Builder from an existing BrandVersion object.

Methods

Builds the current brand, majorVersion and fullVersion into a BrandVersion object.

Returns:

The BrandVersion object represented by this Builder.

public UserAgentMetadata.BrandVersion.Builder setBrand(java.lang.String brand)

Sets the BrandVersion's brand. The brand should not be blank.

Parameters:

brand: The brand is used to generate user-agent client hint sec-ch-ua and sec-ch-ua-full-version-list.

public UserAgentMetadata.BrandVersion.Builder setMajorVersion(java.lang.String majorVersion)

Sets the BrandVersion's majorVersion. The majorVersion should not be blank.

Parameters:

majorVersion: The majorVersion is used to generate user-agent client hint sec-ch-ua.

public UserAgentMetadata.BrandVersion.Builder setFullVersion(java.lang.String fullVersion)

Sets the BrandVersion's fullVersion. The fullVersion should not be blank.

Parameters:

fullVersion: The brand is used to generate user-agent client hint sec-ch-ua-full-version-list.