AdTechIdentifier
  public
  
  final
  
  class
  AdTechIdentifier
  
    extends Object
  
  
  
  
  
      implements
      
        Parcelable
      
  
  
| java.lang.Object | |
| ↳ | android.adservices.common.AdTechIdentifier | 
用于表示广告买方或卖方的标识符。
摘要
| 继承的常量 | 
|---|
| 字段 | |
|---|---|
| 
    public
    static
    final
    Creator<AdTechIdentifier> | CREATOR
 | 
| 公共方法 | |
|---|---|
| 
        
        
        
        
        
        int | 
      describeContents()
      描述此 Parcelable 中包含的特殊对象的种类。 实例的编排表示法。 | 
| 
        
        
        
        
        
        boolean | 
      equals(Object o)
      将此 AdTechIdentifier 与指定对象进行比较。 | 
| 
        
        
        static
        
        
        AdTechIdentifier | 
      fromString(String source)
      基于字符串构造此类的实例。 | 
| 
        
        
        
        
        
        int | 
      hashCode()
      返回与此类的字符串表示法相对应的哈希代码(通过
 正在调用  | 
| 
        
        
        
        
        
        String | 
      toString()
      返回对象的字符串表示。 | 
| 
        
        
        
        
        
        void | 
      writeToParcel(Parcel dest, int flags)
      将此对象展平为 Parcel。 | 
| 继承的方法 | |
|---|---|
字段
公共方法
describeContents
public int describeContents ()
描述此 Parcelable 实例的编排表示中包含的特殊对象的种类。例如,如果对象将在 writeToParcel(android.os.Parcel, int) 的输出中添加一个文件描述符,那么此方法的返回值就必须包含 CONTENTS_FILE_DESCRIPTOR 位。
| 返回 | |
|---|---|
| int | 一个位掩码,表示编组的特殊对象类型集
 。
 
 值为 0或CONTENTS_FILE_DESCRIPTOR | 
equals
public boolean equals (Object o)
将此 AdTechIdentifier 与指定对象进行比较。当且仅当参数不是 null 而是具有相同字符串形式(通过调用 toString() 获取)的 AdTechIdentifier 对象时,结果方为 true。请注意,此方法不会执行任何 eTLD+1 标准化,因此如果对象的字符串表示法不相等,那么具有相同 eTLD+1 的两个 AdTechIdentifier 对象可能会不相等。
| 参数 | |
|---|---|
| o | Object:用于与此 AdTechIdentifier 进行比较的对象 | 
| 返回 | |
|---|---|
| boolean | 如果指定对象表示与此 AdTechIdentifier 相等的 AdTechIdentifier,则返回 true,否则返回 false | 
fromString
public static AdTechIdentifier fromString (String source)
基于字符串构造此类的实例。
| 参数 | |
|---|---|
| source | String:广告买方/卖方的有效 eTLD+1 网域或 null。 | 
| 返回 | |
|---|---|
| AdTechIdentifier | 封装指定网域的 AdTechIdentifier类;如果输入为 null,则返回 null。 | 
hashCode
public int hashCode ()
返回与此类的字符串表示法(通过调用 toString() 获取)相对应的哈希代码。请注意,此方法不会执行任何 eTLD+1 标准化,因此如果底层字符串表示法不同,那么具有相同 eTLD+1 的两个 AdTechIdentifier 对象的哈希代码可能会不同。
| 返回 | |
|---|---|
| int | 此对象的哈希代码值。 | 
toString
public String toString ()
返回对象的字符串表示。通常,toString 方法会返回一个“以文本形式表示”此对象的字符串。结果应该是一个简洁但信息丰富,并且便于阅读的字符串表示。建议所有子类都覆盖此方法。
 
 类 Object 的 toString 方法会返回一个字符串,其中包含类的名称(相应对象是此类的实例)、字符“@”,以及此对象哈希代码的无符号十六进制表示。也就是说,此方法所返回的字符串等于以下公式的值:
| 返回 | |
|---|---|
| String | 字符串形式的标识符。此值不能为 null。 | 
writeToParcel
public void writeToParcel (Parcel dest, int flags)
将此对象扁平化为 Parcel。
| 参数 | |
|---|---|
| dest | Parcel:此值不能为null。 | 
| flags | int:关于如何写入对象的其他标志。可为 0 或Parcelable.PARCELABLE_WRITE_RETURN_VALUE。
 
 值为0或Parcelable.PARCELABLE_WRITE_RETURN_VALUE和 android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES 的组合 | 
