当前位置: 首页>>代码示例>>Java>>正文


Java Entry.getValue方法代码示例

本文整理汇总了Java中java.util.Map.Entry.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Entry.getValue方法的具体用法?Java Entry.getValue怎么用?Java Entry.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Map.Entry的用法示例。


在下文中一共展示了Entry.getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: save

import java.util.Map.Entry; //导入方法依赖的package包/类
@Override
public IStatus save() {
	try {
		final IEclipsePreferences node = InstanceScope.INSTANCE.getNode(QUALIFIER);
		for (final Entry<Binary, URI> entry : getOrCreateState().entrySet()) {
			final URI path = entry.getValue();
			if (null != path) {
				final File file = new File(path);
				if (file.isDirectory()) {
					node.put(entry.getKey().getId(), file.getAbsolutePath());
				}
			} else {
				// Set to default.
				node.put(entry.getKey().getId(), "");
			}
		}
		node.flush();
		return OK_STATUS;
	} catch (final BackingStoreException e) {
		final String message = "Unexpected error when trying to persist binary preferences.";
		LOGGER.error(message, e);
		return statusHelper.createError(message, e);
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:25,代码来源:OsgiBinariesPreferenceStore.java

示例2: processNode

import java.util.Map.Entry; //导入方法依赖的package包/类
@Override
protected void processNode(Node node) {
    if (node instanceof GuardNode) {
        processGuard(node);
    } else if (node instanceof Access) {
        processAccess((Access) node);
    }
    if (node instanceof StateSplit && ((StateSplit) node).stateAfter() != null) {
        nullGuarded.clear();
    } else {
        Iterator<Entry<ValueNode, GuardNode>> it = nullGuarded.entrySet().iterator();
        while (it.hasNext()) {
            Entry<ValueNode, GuardNode> entry = it.next();
            GuardNode guard = entry.getValue();
            if (guard.usages().contains(node)) {
                it.remove();
            }
        }
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:21,代码来源:GuardLoweringPhase.java

示例3: showPostParams

import java.util.Map.Entry; //导入方法依赖的package包/类
private static void showPostParams(int requestId, Map<String, Object> params) {
	String message = "Post." + requestId + ".Params:";
	StringBuilder stringBuilder = new StringBuilder();
	stringBuilder.append(message);
	String separator = "&";
	Iterator<Entry<String, Object>> it = params.entrySet().iterator();
	while (it.hasNext()) {
		Entry<String, Object> entry = it.next();
		String key = entry.getKey();
		Object value = entry.getValue();

		stringBuilder.append(separator);
		stringBuilder.append(String.format(Locale.getDefault(), "%s=%s", key, value));
	}
	//将第一个分隔符删除
	int separatorIndex;
	if ((separatorIndex = stringBuilder.indexOf(separator)) != -1) {
		stringBuilder.deleteCharAt(separatorIndex);
	}
	LogUtils.info(stringBuilder.toString());
}
 
开发者ID:PlutoArchitecture,项目名称:Pluto-Android,代码行数:22,代码来源:ApiClient.java

示例4: delete

import java.util.Map.Entry; //导入方法依赖的package包/类
/**
 * Remove a {@link CatalogType} object from this collection.
 * @param name The name of the object to remove.
 */
public boolean delete(String name) {
    try {
        if (m_items.containsKey(name) == false)
            throw new CatalogException("Catalog item '" + name + "' doesn't exists in " + m_parent);

        m_items.remove(name);

        // update versioning if needed
        updateVersioning();

        // assign a relative index to every child item
        int index = 1;
        for (Entry<String, T> e : m_items.entrySet()) {
            e.getValue().m_relativeIndex = index++;
        }
    } catch (Exception ex) {
        throw new RuntimeException(ex);
    }
    
    m_fastArray = null;
    return (true);
}
 
开发者ID:s-store,项目名称:s-store,代码行数:27,代码来源:CatalogMap.java

示例5: getQueryString

import java.util.Map.Entry; //导入方法依赖的package包/类
private String getQueryString(){
	StringBuilder query = new StringBuilder();
	for(Entry<String,List<String>> param : queryParams.entrySet()){
		String key = param.getKey();
		if(key == null || key.trim().isEmpty()){
			continue;
		}
		String urlEncodedKey = urlEncode(key.trim());
		for(String value : param.getValue()){
			query.append('&').append(urlEncodedKey);
			if(value != null && !value.isEmpty()){
				query.append('=').append(urlEncode(value));
			}
		}
	}
	return "?" + query.substring(1);
}
 
开发者ID:hotpads,项目名称:datarouter,代码行数:18,代码来源:DatarouterHttpRequest.java

示例6: cntByTimeString

import java.util.Map.Entry; //导入方法依赖的package包/类
public String cntByTimeString() {
    DecimalFormat df = new DecimalFormat(DECIMAL_PATTERN);
    List<String> millisStr = new LinkedList<String>();
    
    Iterator <Entry<Integer,Integer>>iter = millisMap.entrySet().iterator();
    while(iter.hasNext()) {
        Entry<Integer,Integer> millisEntry = iter.next();
        Integer bucket = (Integer)millisEntry.getKey();
        Integer bucketCount = (Integer)millisEntry.getValue();
        
        int minMillis = bucket.intValue() * millisPerBucket;
        int maxMillis = (bucket.intValue() + 1) * millisPerBucket;
        
        millisStr.add(
          df.format(minMillis/MILLIS_PER_SECOND)+" s "+
          "- "+
          df.format(maxMillis/MILLIS_PER_SECOND)+" s "+
          "= " + bucketCount);
    }
    return millisStr.toString();
}
 
开发者ID:WillemJiang,项目名称:acmeair,代码行数:22,代码来源:JtlTotals.java

示例7: subMaps

import java.util.Map.Entry; //导入方法依赖的package包/类
public List<StringListMap<T>> subMaps(final int size, boolean perMap) {
    final LinkedList<StringListMap<T>> maps = new LinkedList<StringListMap<T>>();
    int index = 0;
    int count = 0;
    for (final Entry<String, List<T>> entry : entrySet()) {
        for (final T value : entry.getValue()) {
            if (index == maps.size()) {
                maps.add(new StringListMap<T>());
            }
            maps.get(index).add(entry.getKey(), value);
            index = perMap ? (++count / size) : (++index % size);
        }
    }
    return maps;
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:16,代码来源:DynamoDbMapper.java

示例8: servicesByState

import java.util.Map.Entry; //导入方法依赖的package包/类
ImmutableMultimap<State, Service> servicesByState() {
  ImmutableSetMultimap.Builder<State, Service> builder = ImmutableSetMultimap.builder();
  monitor.enter();
  try {
    for (Entry<State, Service> entry : servicesByState.entries()) {
      if (!(entry.getValue() instanceof NoOpService)) {
        builder.put(entry);
      }
    }
  } finally {
    monitor.leave();
  }
  return builder.build();
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:15,代码来源:ServiceManager.java

示例9: getSettingsMap

import java.util.Map.Entry; //导入方法依赖的package包/类
public Map<AbstractParentSettingsSection<?>, Set<String>> getSettingsMap()
{
	Map<AbstractParentSettingsSection<?>, Set<String>> settingsMap = Maps.newHashMap();

	for( Entry<String, Extension> extEntry : settingsExtensions.getExtensionMap().entrySet() )
	{
		Extension settingExt = extEntry.getValue();
		Collection<Parameter> groupParams = settingExt.getParameters("grouping");
		AbstractParentSettingsSection<?> bean = settingsExtensions.getBeanByExtension(settingExt);
		if( !Check.isEmpty(groupParams) )
		{
			for( Parameter groupParam : groupParams )
			{
				Set<String> groups = settingsMap.get(bean);
				if( groups == null )
				{
					groups = Sets.newHashSet();
					settingsMap.put(bean, groups);
				}
				groups.add(groupParam.valueAsString());
			}
		}
		else
		{
			settingsMap.put(bean, new HashSet<String>());
		}
	}

	return settingsMap;
}
 
开发者ID:equella,项目名称:Equella,代码行数:31,代码来源:SettingsSection.java

示例10: write

import java.util.Map.Entry; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void write(Map<String, MutablePair<String, ?>> map) throws IOException
{
    this.updateIndent(true);
    int keys = map.entrySet().size();
    int k = 0;
    for (Entry<String, MutablePair<String, ?>> entry : map.entrySet())
    {
        k += 1;
        MutablePair<String, ?> pair = entry.getValue();
        String comment = pair.getLeft();
        Map<String, MutablePair<String, ?>> rightMap = (Map<String, MutablePair<String, ?>>) pair.getRight();

        int rightKeys = (rightMap == null) ? 0 : rightMap.size();
        boolean newLine = keys > 3;
        if (comment != null)
        {
            this.writeComment(comment);
        }

        String key = entry.getKey();
        this.writeKey(key);
        if (rightMap != null)
        {
            this.write(rightMap);
        }
        if (newLine)
        {
            this.writeNewLine(false);
        }
    }
    this.writeNewLine(false);
    this.updateIndent(false);
}
 
开发者ID:GotoFinal,项目名称:diorite-configs-java8,代码行数:35,代码来源:CommentsWriter.java

示例11: getChangedTableEntries

import java.util.Map.Entry; //导入方法依赖的package包/类
public Collection<Table> getChangedTableEntries(PartitionPlan other) {
    Set<Table> changed = new HashSet<Table>();
    for (Entry<Table, TableEntry> e : this.table_entries.entrySet()) {
        if (!other.table_entries.containsKey(e.getKey())) {
            changed.add(e.getKey());
        } else {
            TableEntry pe0 = e.getValue();
            TableEntry pe1 = other.table_entries.get(e.getKey());
            if (!pe0.equals(pe1))
                changed.add(e.getKey());
        }
    } // FOR
    return (changed);
}
 
开发者ID:s-store,项目名称:s-store,代码行数:15,代码来源:PartitionPlan.java

示例12: testScanFilter_EXISTS

import java.util.Map.Entry; //导入方法依赖的package包/类
@Test
public void testScanFilter_EXISTS() {
    ScanFilter ScanFilter = new ScanFilter("foo").exists();
    Entry<String, Condition> ddbscanFilter = toAttributeCondition(ScanFilter);
    String ddbscanFilter_attrName = ddbscanFilter.getKey();
    Condition ddbscanFilter_value = ddbscanFilter.getValue();

    Assert.assertEquals("foo", ddbscanFilter_attrName);
    Assert.assertEquals(ComparisonOperator.NOT_NULL, ddbscanFilter_value.comparisonOperator());
    Assert.assertEquals(null, ddbscanFilter_value.attributeValueList());
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:12,代码来源:FilterConditionTest.java

示例13: getHasUnitSubUnUnitTopicList

import java.util.Map.Entry; //导入方法依赖的package包/类
public byte[] getHasUnitSubUnUnitTopicList() {
    TopicList topicList = new TopicList();
    try {
        try {
            this.lock.readLock().lockInterruptibly();
            Iterator<Entry<String, List<QueueData>>> topicTableIt =
                    this.topicQueueTable.entrySet().iterator();
            while (topicTableIt.hasNext()) {
                Entry<String, List<QueueData>> topicEntry = topicTableIt.next();
                String topic = topicEntry.getKey();
                List<QueueData> queueDatas = topicEntry.getValue();
                if (queueDatas != null && queueDatas.size() > 0
                        && !TopicSysFlag.hasUnitFlag(queueDatas.get(0).getTopicSynFlag())
                        && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) {
                    topicList.getTopicList().add(topic);
                }
            }
        }
        finally {
            this.lock.readLock().unlock();
        }
    }
    catch (Exception e) {
        log.error("getAllTopicList Exception", e);
    }

    return topicList.encode();
}
 
开发者ID:y123456yz,项目名称:reading-and-annotate-rocketmq-3.4.6,代码行数:29,代码来源:RouteInfoManager.java

示例14: isPrimitiveTypeMap

import java.util.Map.Entry; //导入方法依赖的package包/类
protected boolean isPrimitiveTypeMap(Object o) {
  if (!(o instanceof Map<?, ?>))
    return false;
  Map<?, ?> m = (Map<?, ?>) o;

  Set<?> eset = m.entrySet();
  for (Object entry : eset) {
    Entry<?, ?> e = (Entry<?, ?>) entry;
    if (e.getValue() != null && !isPrimitiveType(e.getValue().getClass().getName()))
      return false;
  }
  return true;
}
 
开发者ID:twosigma,项目名称:beaker-notebook-archive,代码行数:14,代码来源:BasicObjectSerializer.java

示例15: writeObject

import java.util.Map.Entry; //导入方法依赖的package包/类
/**
 * @serialData Null terminated list of <code>VetoableChangeListeners</code>.
 * <p>
 * At serialization time we skip non-serializable listeners and
 * only serialize the serializable listeners.
 */
private void writeObject(ObjectOutputStream s) throws IOException {
    Hashtable<String, VetoableChangeSupport> children = null;
    VetoableChangeListener[] listeners = null;
    synchronized (this.map) {
        for (Entry<String, VetoableChangeListener[]> entry : this.map.getEntries()) {
            String property = entry.getKey();
            if (property == null) {
                listeners = entry.getValue();
            } else {
                if (children == null) {
                    children = new Hashtable<>();
                }
                VetoableChangeSupport vcs = new VetoableChangeSupport(this.source);
                vcs.map.set(null, entry.getValue());
                children.put(property, vcs);
            }
        }
    }
    ObjectOutputStream.PutField fields = s.putFields();
    fields.put("children", children);
    fields.put("source", this.source);
    fields.put("vetoableChangeSupportSerializedDataVersion", 2);
    s.writeFields();

    if (listeners != null) {
        for (VetoableChangeListener l : listeners) {
            if (l instanceof Serializable) {
                s.writeObject(l);
            }
        }
    }
    s.writeObject(null);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:VetoableChangeSupport.java


注:本文中的java.util.Map.Entry.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。