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:gov.nih.nci.ncicb.tcga.dcc.dam.webservice.DAMWSUtil.java

public boolean hasValueIgnoreCase(Map map, String str) {
    for (Object o : map.values()) {
        if (o.toString().equalsIgnoreCase(str)) {
            return true;
        }/* w w  w . ja  v  a 2s.  c om*/
    }
    return false;
}

From source file:com.agimatec.validation.MetaBeanCache.java

public MetaBeanCache(Map<String, MetaBean> beans) {
    this();/*from  w w w .  ja  va  2  s . c o m*/
    for (MetaBean bean : beans.values()) {
        cache(bean);
    }
}

From source file:io.gravitee.repository.redis.management.internal.impl.TagRedisRepositoryImpl.java

@Override
public Set<RedisTag> findAll() {
    final Map<Object, Object> tags = redisTemplate.opsForHash().entries(REDIS_KEY);

    return tags.values().stream().map(object -> convert(object, RedisTag.class)).collect(Collectors.toSet());
}

From source file:io.gravitee.repository.redis.management.internal.impl.UserRedisRepositoryImpl.java

@Override
public Set<RedisUser> findAll() {
    Map<Object, Object> users = redisTemplate.opsForHash().entries(REDIS_KEY);

    return users.values().stream().map(object -> convert(object, RedisUser.class)).collect(Collectors.toSet());
}

From source file:com.fengduo.bee.commons.core.lang.CollectionUtils.java

public static <T extends Object> List<T> join(String property, Collection<T>... arrays) {
    Map<String, T> resultMap = new HashMap<String, T>();
    for (Collection<T> array : arrays) {
        if (array == null || array.isEmpty())
            continue;
        Map<String, T> map = toMap(array, property);
        resultMap.putAll(map);//w  w w  . j a  v a 2s.  c om
    }
    return new ArrayList<T>(resultMap.values());
}

From source file:io.gravitee.repository.redis.management.internal.impl.ViewRedisRepositoryImpl.java

@Override
public Set<RedisView> findAll() {
    final Map<Object, Object> views = redisTemplate.opsForHash().entries(REDIS_KEY);

    return views.values().stream().map(object -> convert(object, RedisView.class)).collect(Collectors.toSet());
}

From source file:com.ah.be.common.PresenceUtil.java

public static void initPresenceCustomerCache() {
    synchronized (customerInfo) {
        Map<Long, String> customers = new ConcurrentHashMap<Long, String>();
        String query = "select customerId, owner.id from " + PresenceAnalyticsCustomer.class.getCanonicalName();
        List<?> list = QueryUtil.executeQuery(query, null, null);
        for (Object object : list) {
            Object[] objects = (Object[]) object;
            customers.put((Long) objects[1], (String) objects[0]);
        }//  www  .j av a  2 s .  c om
        domainInfo = customers;
        log.info("load presence customer info from db: " + domainInfo);
        Set<String> invalidCustomers = new HashSet<String>();
        for (String customerId : customerInfo.keySet()) {
            if (!customers.values().contains(customerId)) {
                invalidCustomers.add(customerId);
            }
        }
        for (String customerId : invalidCustomers) {
            log.info("customer #: " + customerId
                    + " is not existed in current HiveManager, remove its presence customer info from cache.");
            customerInfo.remove(customerId);
            userInfo.remove(customerId);
        }
    }
}

From source file:org.synyx.hera.core.support.AbstractTypeAwareSupport.java

/**
 * Returns all beans from the {@link ApplicationContext} that match the
 * given type./*  ww  w. j  av  a  2s . c o m*/
 * 
 * @return
 */
@SuppressWarnings("unchecked")
protected List<T> getBeans() {

    Map<String, T> pluginMap = context.getBeansOfType(type);

    return new ArrayList<T>(pluginMap.values());
}

From source file:com.threewks.thundr.bind.http.MultipartHttpBinder.java

/**
 * If all parameters have been bound, we don't need to try to bind. This means we won't consume the stream leaving it in tact to be read in controllers.
 * /*ww w .  j a  v  a  2  s . co m*/
 * @param bindings
 * @return
 */
boolean shouldTryToBind(Map<ParameterDescription, Object> bindings) {
    return bindings.values().contains(null);
}

From source file:org.dozer.functional_tests.spring.SpringIntegrationTest.java

@Test
public void testCreation() {
    Map map = context.getBeansOfType(Mapper.class);
    assertFalse(map.isEmpty());/*from ww  w.j  a  va 2  s  . c  o  m*/
    Object bean = map.values().iterator().next();
    assertTrue(bean instanceof DozerBeanMapper);

    DozerBeanMapper mapper = (DozerBeanMapper) bean;
    assertFalse(mapper.getMappingFiles().isEmpty());
}