AdTechIdentifier
  public
  
  final
  
  class
  AdTechIdentifier
  
    extends Object
  
  
  
  
  
      implements
      
        Parcelable
      
  
  
| java.lang.Object | |
| ↳ | android.adservices.common.AdTechIdentifier | 
代表廣告買方或賣方的 ID。
摘要
| 繼承常數 | 
|---|
| 欄位 | |
|---|---|
| 
    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。 | 
| 繼承方法 | |
|---|---|
欄位
CREATOR
public static final Creator<AdTechIdentifier> CREATOR
公用方法
describeContents
public int describeContents ()
描述此 Parcelable 例項管理表示法中包含的特別物件種類。舉例來說,如果物件在 writeToParcel(android.os.Parcel, int) 的輸出內容中會包含檔案描述元,此方法的傳回值就必須包含 CONTENTS_FILE_DESCRIPTOR 位元。
| 傳回 | |
|---|---|
| int | 位元遮罩,表示管理的特殊物件類型組合
 這個 Parcelable 物件執行個體
 
 值為 0或CONTENTS_FILE_DESCRIPTOR | 
equals
public boolean equals (Object o)
比較此 AdTechIdentifier 與指定物件。只有在引數不是空值,且是具有相同字串格式 (藉由呼叫 toString() 取得) 的 AdTechIdentifier 物件時,結果才會是 true。請注意,這個方法不會執行 eTLD+1 正規化作業,因此如果物件的字串表示法不相等,則兩個具有相同 eTLD+1 的 AdTechIdentifier 物件也不會相等。
| 參數 | |
|---|---|
| o | Object:用來與此 AdTechIdentifier 相較的物件 | 
| 傳回 | |
|---|---|
| boolean | 如果指定物件代表與此 AdTechIdentifier 相等的 AdTechIdentifier,會傳回 true,否則傳回 false | 
fromString
public static AdTechIdentifier fromString (String source)
使用 String 建構此類別的例項。
| 參數 | |
|---|---|
| source | String:廣告買方/賣方的有效 eTLD+1 網域,或是空值。 | 
| 傳回 | |
|---|---|
| AdTechIdentifier | 包裝指定網域的 AdTechIdentifier類別。輸入內容為空值時會傳回空值。 | 
hashCode
public int hashCode ()
傳回此類別字串表示法的對應雜湊碼,類別字串表示法是由呼叫 toString() 取得。請注意,這個方法不會執行 eTLD+1 正規化作業,因此如果基礎字串表示法不同,兩個具有相同 eTLD+1 的 AdTechIdentifier 物件也會有不同的雜湊碼。
| 傳回 | |
|---|---|
| int | 此物件的雜湊碼值。 | 
toString
public String toString ()
傳回該物件的字串表示法。一般來說,toString 方法會傳回「以文字方式代表」這個物件的字串。顯示的結果應簡明扼要,並提供方便使用者閱讀的豐富資訊。建議所有子類別都覆寫此方法。
 類別 Object 的 toString 方法會傳回一個字串,當中包含物件為例項的類別名稱、「@」符號字元,以及物件雜湊程式碼的不帶正負號十六進位表示法。換句話說,此方法會傳回等於下列值的字串:
| 傳回 | |
|---|---|
| String | 字串形式的 ID。此值不能為 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 | 
