當前位置: 首頁>>代碼示例>>Java>>正文


Java ArrayMap.entrySet方法代碼示例

本文整理匯總了Java中android.support.v4.util.ArrayMap.entrySet方法的典型用法代碼示例。如果您正苦於以下問題:Java ArrayMap.entrySet方法的具體用法?Java ArrayMap.entrySet怎麽用?Java ArrayMap.entrySet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v4.util.ArrayMap的用法示例。


在下文中一共展示了ArrayMap.entrySet方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addJavaObjects

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
@Override
public JsInterfaceHolder addJavaObjects(ArrayMap<String, Object> maps) {



    if(!checkSecurity()){
        LogUtils.i(TAG,"The injected object is not safe, give up injection");
        return this;
    }
    LogUtils.i(TAG,"inject set:"+maps.size());

    Set<Map.Entry<String, Object>> sets = maps.entrySet();
    for (Map.Entry<String, Object> mEntry : sets) {

        Object v = mEntry.getValue();
        boolean t = checkObject(v);
        if (!t)
            throw new JsInterfaceObjectException("this object has not offer method javascript to call ,please check addJavascriptInterface annotation was be added");

        else
            addJavaObjectDirect(mEntry.getKey(), v);
    }

    return this;
}
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:26,代碼來源:JsInterfaceHolderImpl.java

示例2: addJavaObjects

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
@Override
public JsInterfaceHolder addJavaObjects(ArrayMap<String, Object> maps) {



    if(!checkSecurity()){
        return this;
    }
    Set<Map.Entry<String, Object>> sets = maps.entrySet();
    for (Map.Entry<String, Object> mEntry : sets) {


        Object v = mEntry.getValue();
        boolean t = checkObject(v);
        if (!t)
            throw new JsInterfaceObjectException("this object has not offer method javascript to call ,please check addJavascriptInterface annotation was be added");

        else
            addJavaObjectDirect(mEntry.getKey(), v);
    }

    return this;
}
 
開發者ID:Justson,項目名稱:AgentWebX5,代碼行數:24,代碼來源:JsInterfaceHolderImpl.java

示例3: onBindViewHolder

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    holder.tvTitle.setText(mMap.keyAt(position));
    holder.flContent.removeAllViews();
    ArrayMap<String,String> mNodeBlock = mMap.valueAt(position);
    for (ArrayMap.Entry<String,String> node : mNodeBlock.entrySet()) {
        TextView tvNode = new TextView(mContext);
        tvNode.setText(node.getValue());
        tvNode.setTextColor(ContextCompat.getColor(mContext, R.color.colorText));
        tvNode.setPadding(SystemUtil.dp2px(6f), SystemUtil.dp2px(6f), SystemUtil.dp2px(6f), SystemUtil.dp2px(6f));
        tvNode.setOnClickListener(new OnNodeClickListener(node.getKey()));
        holder.flContent.addView(tvNode);
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:15,代碼來源:NodeAdapter.java

示例4: composeNavigationUri

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
public static Uri composeNavigationUri(String schemeString, String host, String path, ArrayMap<String, String> extras)
{
    StringBuilder builder = new StringBuilder(schemeString).append("://").append(host);

    if(!TextUtils.isEmpty(path))
    {
        builder.append("/").append(path);
    }

    if(extras != null && extras.size() > 0)
    {
        builder.append("?");

        for(Entry<String, String> entry : extras.entrySet())
        {
            if(entry == null) continue;

            builder.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
        }
    }

    String result = builder.toString();

    if(result.endsWith("?") || result.endsWith("&"))
    {
        result = result.substring(0, result.length() - 1);
    }

    return Uri.parse(result);
}
 
開發者ID:kfrozen,項目名稱:DeeplinkRouter,代碼行數:31,代碼來源:DPRouter.java

示例5: parseItemName

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
public static String parseItemName(ZabbixItem item) {
    String itemName = item.getName();
    // parse item key
    // key is presented in next format: <keyId>[<keyArg1>, <keyArg2>, ...]
    final String keyString = item.getKey();
    String[] keys = keyString.substring(keyString.indexOf('[') + 1,
            keyString.lastIndexOf(']')).split(",");

    ArrayMap<String, String> argToValueMap = new ArrayMap<String, String>();

    final Matcher argMatcher = STTR_PATTERN.matcher(itemName);
    while (argMatcher.find()) {
        final String argument = itemName.substring(argMatcher.start(),
                argMatcher.end());
        final String argumentNumber = argument.replace("$", "");
        // arguments starts from 1
        final String value = keys[Integer.valueOf(argumentNumber) - 1];
        argToValueMap.put(argument, value);
    }

    for (Entry<String, String> entry : argToValueMap.entrySet()) {
        itemName = itemName
                .replace(entry.getKey(), entry.getValue().trim());
    }

    return itemName;
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:28,代碼來源:ZabbixItemUtils.java

示例6: onResult

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
@Override
public void onResult(Object result) {
    Log.d("k9res", "onResult: " + result.toString());
    if (result.toString().equalsIgnoreCase("swiped_down")) {
        //do something or nothing
    } else {
        if (result != null) {
            ArrayMap<String, List<String>> applied_filters = (ArrayMap<String, List<String>>) result;
            if (applied_filters.size() != 0) {
                List<SingleMovie> filteredList = mData.getAllMovies();
                //iterate over arraymap
                for (Map.Entry<String, List<String>> entry : applied_filters.entrySet()) {
                    Log.d("k9res", "entry.key: " + entry.getKey());
                    switch (entry.getKey()) {
                        case "genre":
                            filteredList = mData.getGenreFilteredMovies(entry.getValue(), filteredList);
                            break;
                        case "rating":
                            filteredList = mData.getRatingFilteredMovies(entry.getValue(), filteredList);
                            break;
                        case "year":
                            filteredList = mData.getYearFilteredMovies(entry.getValue(), filteredList);
                            break;
                        case "quality":
                            filteredList = mData.getQualityFilteredMovies(entry.getValue(), filteredList);
                            break;
                    }
                }
                Log.d("k9res", "new size: " + filteredList.size());
                mList.clear();
                mList.addAll(filteredList);
                mAdapter.notifyDataSetChanged();

            } else {
                mList.addAll(mData.getAllMovies());
                mAdapter.notifyDataSetChanged();
            }
        }
        //handle result
    }
}
 
開發者ID:Krupen,項目名稱:FabulousFilter,代碼行數:42,代碼來源:MainActivity.java

示例7: settingsShouldBeNullIfNotChanged

import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
@Test
public void settingsShouldBeNullIfNotChanged() {

    ArrayMap<String,String> testArrayMap = fattsSetting.getSpecs();

    for (ArrayMap.Entry<String,String> entry : testArrayMap.entrySet()) {
        assertEquals(entry.getValue(), null);
    }

}
 
開發者ID:Visions-Team,項目名稱:eBread,代碼行數:11,代碼來源:FattsSettingTest.java


注:本文中的android.support.v4.util.ArrayMap.entrySet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。