執行檔
public class ExecutionFiles
extends Object
java.lang.Object | |
↳ | com.android.tradefed.invoker.ExecutionFiles |
在執行測試或呼叫期間產生的檔案依賴項,需要攜帶這些依賴項進行測試。該物件由所有呼叫(測試、模組等)共用。
概括
公共方法 | |
---|---|
void | clearFiles () 刪除所有被追蹤且未標記為「不應刪除」的檔案。 |
boolean | containsKey (String key) 如果此映射包含指定鍵的映射,則傳回 |
File | get ( ExecutionFiles.FilesKey key) |
File | get (String key) 傳回指定鍵映射到的值,如果此映射不包含該鍵的映射,則傳回 |
ImmutableMap<String, File> | getAll () 傳回地圖副本中的所有屬性 |
boolean | isEmpty () 傳回屬性映射是否為空。 |
File | put ( ExecutionFiles.FilesKey key, File value) |
File | put ( ExecutionFiles.FilesKey key, File value, boolean shouldNotDelete) |
File | put (String key, File value) 將指定值與此映射中的指定鍵相關聯。 |
ExecutionFiles | putAll ( properties) putAll ( properties) 將指定映射中的所有映射複製到此映射。 |
File | putIfAbsent (String key, File value) 如果指定的鍵尚未與值關聯,則將其與給定值關聯。 |
File | remove (String key) 從此映射中刪除鍵的映射(如果存在)(可選操作)。 |
公共方法
清除文件
public void clearFiles ()
刪除所有被追蹤且未標記為「不應刪除」的檔案。
包含密鑰
public boolean containsKey (String key)
如果此映射包含指定鍵的映射,則傳回true
。
參數 | |
---|---|
key | String :要測試其在此映射中是否存在的鍵 |
退貨 | |
---|---|
boolean | true 如果此映射包含指定鍵的映射 |
得到
public File get (ExecutionFiles.FilesKey key)
get(String)
與已知鍵的變體。
參數 | |
---|---|
key | ExecutionFiles.FilesKey :要傳回關聯值的鍵 |
退貨 | |
---|---|
File | 指定鍵映射到的值,如果此映射不包含該鍵的映射,則null |
得到
public File get (String key)
傳回指定鍵映射到的值,如果此映射不包含該鍵的映射,則傳回null
。
參數 | |
---|---|
key | String : 要傳回關聯值的鍵 |
退貨 | |
---|---|
File | 指定鍵映射到的值,如果此映射不包含該鍵的映射,則null |
得到所有
public ImmutableMap<String, File> getAll ()
傳回地圖副本中的所有屬性
退貨 | |
---|---|
ImmutableMap<String, File> |
是空的
public boolean isEmpty ()
傳回屬性映射是否為空。
退貨 | |
---|---|
boolean |
放
public File put (ExecutionFiles.FilesKey key, File value)
put(String, File)
與已知鍵的變體。
參數 | |
---|---|
key | ExecutionFiles.FilesKey :與指定值關聯的鍵 |
value | File :與指定鍵關聯的值 |
退貨 | |
---|---|
File | 與key 關聯的前一個值,如果key 沒有映射,則為null 。 |
放
public File put (ExecutionFiles.FilesKey key, File value, boolean shouldNotDelete)
put(com.android.tradefed.invoker.ExecutionFiles.FilesKey, File)
的變體,具有防止在呼叫結束時刪除檔案的選項。
參數 | |
---|---|
key | ExecutionFiles.FilesKey :與指定值關聯的鍵 |
value | File :與指定鍵關聯的值 |
shouldNotDelete | boolean :防止檔案在呼叫結束時被刪除。 |
退貨 | |
---|---|
File | 與key 關聯的前一個值,如果key 沒有映射,則為null 。 |
放
public File put (String key, File value)
將指定值與此映射中的指定鍵相關聯。
參數 | |
---|---|
key | String : 與指定值關聯的鍵 |
value | File :與指定鍵關聯的值 |
退貨 | |
---|---|
File | 與key 關聯的前一個值,如果key 沒有映射,則為null 。 |
也可以看看:
全部放入
public ExecutionFiles putAll (properties)
將指定映射中的所有映射複製到此映射。
參數 | |
---|---|
properties |
退貨 | |
---|---|
ExecutionFiles | 最終映射 |
如果缺席則放置
public File putIfAbsent (String key, File value)
如果指定的鍵尚未與值關聯,則將其與給定值關聯。
參數 | |
---|---|
key | String : 與指定值關聯的鍵 |
value | File :與指定鍵關聯的值 |
退貨 | |
---|---|
File | 與指定鍵關聯的前一個值;如果該鍵沒有映射,則傳回null 。 |
消除
public File remove (String key)
從此映射中刪除鍵的映射(如果存在)(可選操作)。
參數 | |
---|---|
key | String : 要從映射中刪除其映射的鍵 |
退貨 | |
---|---|
File | 與key 關聯的前一個值,如果key 沒有映射,則為null 。 |