Example usage for java.util Map values

List of usage examples for java.util Map values

Introduction

In this page you can find the example usage for java.util Map values.

Prototype

Collection<V> values();

Source Link

Document

Returns a Collection view of the values contained in this map.

Usage

From source file:pl.bristleback.server.bristle.conf.resolver.action.ActionExtractorsResolver.java

private <T> void addExtractors(Map<Class, T> extractors, Map<String, T> extractorsContainer,
        Class<T> parametrizedInterface) {
    for (T extractor : extractorsContainer.values()) {
        Class extractorClass = extractor.getClass();
        Class parameterClass = getParameterClass(extractorClass, parametrizedInterface);
        extractors.put(parameterClass, extractor);
        Class primitiveForParameterClass = ReflectionUtils.getPrimitiveForWrapper(parameterClass);
        if (primitiveForParameterClass != null && !extractors.containsKey(primitiveForParameterClass)) {
            extractors.put(primitiveForParameterClass, extractor);
        }//from  w ww .j  a  va  2 s  .c  o  m
    }
}

From source file:com.wickettraining.modelproxy.domain.FakeDatabase.java

private synchronized int getNextId(Map<Integer, Entity> map) {
    int id = 0;// www  . ja  v a 2  s  .  c o m
    for (Entity ent : map.values()) {
        if (ent.getId() > id) {
            id = ent.getId();
        }
    }
    if (id < 0) {
        throw new IllegalStateException("should not have id: " + id);
    }
    return id + 1;
}

From source file:enmasse.controller.flavor.FlavorManager.java

public void flavorsUpdated(Map<String, Flavor> flavorMap) {
    this.flavorMap = flavorMap;
    if (log.isInfoEnabled()) {
        String flavors = flavorMap.values().stream().map(Flavor::toString).collect(Collectors.joining(","));
        log.info(String.format("Got new set of flavors: [%s]", flavors));
    }/*from   www .j a  v  a  2 s.  c  o m*/

}

From source file:org.kee.ssf.service.sys.ResourceService.java

/**
 * ???./*from w  w w  .j  av a2s  . c  o  m*/
 */
private Specification<Resource> buildSpecification(Map<String, Object> searchParams) {
    Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
    Specification<Resource> spec = DynamicSpecifications.bySearchFilter(filters.values(), Resource.class);
    return spec;
}

From source file:com.smartitengineering.cms.spi.impl.content.FieldsObjectConverter.java

private void putFields(Map<String, Field> fields, Put put) {
    for (Field field : fields.values()) {
        if (field == null) {
            logger.warn("Null field in content's own field");
            continue;
        }/*from w  w w .  java2s.  c  o  m*/
        if (field.getValue() == null) {
            if (logger.isWarnEnabled()) {
                logger.warn("Null value for field " + field.getName());
            }
            continue;
        }
        putField(field, put);
    }
}

From source file:io.spring.initializr.actuate.info.DependencyRangesInfoContributor.java

private Version getHigher(Map<String, VersionRange> dep) {
    Version higher = null;//from  w  ww  .  ja  v  a 2 s. co m
    for (VersionRange versionRange : dep.values()) {
        Version candidate = versionRange.getHigherVersion();
        if (higher == null) {
            higher = candidate;
        } else if (candidate.compareTo(higher) > 0) {
            higher = candidate;
        }
    }
    return higher;
}

From source file:org.jasig.portlet.survey.service.report.SurveyReportMapperImpl.java

@PostConstruct
public void init() {
    Map<String, ISurveyReportGenerator> beans = applicationContext.getBeansOfType(ISurveyReportGenerator.class);
    generators.addAll(beans.values());
    Collections.sort(generators, new Comparator<ISurveyReportGenerator>() {
        @Override//from   w  w w .j av  a 2s  . c om
        public int compare(ISurveyReportGenerator g1, ISurveyReportGenerator g2) {
            return g1.getPriority() - g2.getPriority();
        }
    });
}

From source file:ch.cyberduck.ui.cocoa.DuplicateFileController.java

/**
 * @param selected A map with the original files as the key and the destination
 *                 files as the value/*from  www  .j  a  v  a  2 s. c om*/
 */
public void duplicate(final Map<Path, Path> selected) {
    new OverwriteController(parent).overwrite(new ArrayList<Path>(selected.values()), new DefaultMainAction() {
        @Override
        public void run() {
            final Host target = parent.getSession().getHost();
            parent.transfer(
                    new CopyTransfer(parent.getSession().getHost(), SessionFactory.create(target), selected),
                    new ArrayList<Path>(selected.values()), true);
        }
    });
}

From source file:com.liferay.ci.jenkins.cache.LiferayJenkinsBuildCache.java

public Collection<JSONArray> values(String portletId) {
    Map<String, JSONArray> portletCache = _getPortletCache(portletId);

    return portletCache.values();
}

From source file:com.reactivetechnologies.analytics.store.ModelPersistenceStore.java

@Override
public void storeAll(Map<String, RegressionModel> map) {
    if (map != null && !map.isEmpty()) {
        for (RegressionModel r : map.values()) {
            repository.save(r);//w w  w. j a v a2  s. c o  m
        }
    }

}